inconsistent DirectoryIterator+FilterIterator behaviour in PHP?

loveyouforever

New Member
I wrote a script that is using the FilterIterator class that comes from the Standard PHP Library (SPL) and I get different behabours accross PHP 5.x versions :( Here the accept() function:\[code\]public function accept(){ $current = $this->current();print_r($current); return true;} \[/code\]and heres its output for PHP 5.3.1:\[code\]DirectoryIterator Object( [pathName:SplFileInfo:private] => /Users/alex/Sites/dev/php/fscms/content/. [fileName:SplFileInfo:private] => . [glob:DirectoryIterator:private] => [subPathName:RecursiveDirectoryIterator:private] => )DirectoryIterator Object( [pathName:SplFileInfo:private] => /Users/alex/Sites/dev/php/fscms/content/.. [fileName:SplFileInfo:private] => .. [glob:DirectoryIterator:private] => [subPathName:RecursiveDirectoryIterator:private] => )DirectoryIterator Object( [pathName:SplFileInfo:private] => /Users/alex/Sites/dev/php/fscms/content/.DS_Store [fileName:SplFileInfo:private] => .DS_Store [glob:DirectoryIterator:private] => [subPathName:RecursiveDirectoryIterator:private] => )\[/code\]and heres what I get with the same code under PHP 5.2.5\[code\]DirectoryIterator Object()DirectoryIterator Object()DirectoryIterator Object()\[/code\]The latter has permission 755 on all files. Whats up with dat?
 
Back
Top