advertisement

Article:
  Why PHP 5 Rocks!
Subject:   Another reason to switch to PHP 5.0 from PHP 4.0: iterators
Date:   2004-07-27 09:02:22
From:   Trackback from http://www.blindmindseye.com/archives/000326.php anonymous2
O'Reilly's ONLamp.com has this cool example: PHP 4.X: $dir = opendir($path); while (false !== ($file = readdir($dir))) {      print "$file\n"; } closedir($dir);   PHP 5.0 foreach (new DirectoryIterator($path) as $file) {      print "$file\n"; } The PHP team is really trying...