From: Marcus Boerger Date: Fri, 23 Jan 2004 22:33:45 +0000 (+0000) Subject: Fix this example X-Git-Tag: php_ibase_before_split~20 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eff2006e4efce7fec346aa3d3da03583da3854b6;p=php Fix this example --- diff --git a/ext/spl/examples/findfile.php b/ext/spl/examples/findfile.php index 5cdd0dc893..68c0e0dd65 100755 --- a/ext/spl/examples/findfile.php +++ b/ext/spl/examples/findfile.php @@ -33,9 +33,9 @@ class FindFile extends FilterIterator parent::__construct(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path))); } function accept() { - return !strcmp($this->it->current(), $this->file); + return !strcmp($this->current(), $this->file); } } -foreach(new FindFile($argv[1], $argv[2]) as $pathname => $file) echo "$pathname\n"; +foreach(new FindFile($argv[1], $argv[2]) as $pathname => $file) echo $file->getPathname()."\n"; ?> \ No newline at end of file