cvs: php-src(PHP_5_2) /ext/spl/tests iterator_040.phpt

From: Date: Thu, 18 May 2006 22:52:04 +0000
Subject: cvs: php-src(PHP_5_2) /ext/spl/tests iterator_040.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-38278@lists.php.net to get a copy of this message
helly Thu May 18 22:52:04 2006 UTC Added files: (Branch: PHP_5_2) /php-src/ext/spl/tests iterator_040.phpt Log: - MFH Add new test http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/tests/iterator_040.phpt?view=markup&rev=1.1 Index: php-src/ext/spl/tests/iterator_040.phpt +++ php-src/ext/spl/tests/iterator_040.phpt --TEST-- SPL: RecursiveFilterIterator --SKIPIF-- <?php if (!extension_loaded("spl")) print "skip"; ?> --FILE-- <?php class MyRecursiveFilterIterator extends RecursiveFilterIterator { function accept() { return true; } } $ar = array(1, array(21, 22), 3); $it = new RecursiveArrayIterator($ar); $it = new MyRecursiveFilterIterator($it); $it = new RecursiveIteratorIterator($it); foreach($it as $k => $v) { echo "===\n"; var_dump($it->getDepth()); var_dump($k); var_dump($v); } ?> ===DONE=== <?php exit(0); ?> --EXPECT-- === int(0) int(0) int(1) === int(1) int(0) int(21) === int(1) int(1) int(22) === int(0) int(2) int(3) ===DONE===

« previous php.cvs (#38278) next »