cvs: php-src /ext/spl/tests bug31926.phpt
| From: | Marcus Boerger | Date: | Sat, 12 Feb 2005 18:40:20 +0000 |
| Subject: | cvs: php-src /ext/spl/tests bug31926.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-30372@lists.php.net to get a copy of this message | ||
helly Sat Feb 12 13:40:20 2005 EDT
Added files:
/php-src/ext/spl/tests bug31926.phpt
Log:
- Add new test
http://cvs.php.net/co.php/php-src/ext/spl/tests/bug31926.phpt?r=1.1&p=1
Index: php-src/ext/spl/tests/bug31926.phpt
+++ php-src/ext/spl/tests/bug31926.phpt
--TEST--
Bug #31926 (php in free() error with RecursiveArrayIterator)
--FILE--
<?php
$array = array(0 => array('world'));
class RecursiveArrayIterator extends ArrayIterator implements
RecursiveIterator {
function hasChildren() {
return (is_array($this->current()));
}
function getChildren() {
return new self($this->current());
}
}
$it = new RecursiveIteratorIterator(new RecursiveArrayIterator($array));
foreach($it as $key => $val) {
var_dump($key, $val);
}
?>
--EXPECT--
int(0)
string(5) "world"