1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 18:23:26 +02:00

This commit was manufactured by cvs2svn to create branch 'PHP_5_0'.

This commit is contained in:
SVN Migration
2005-02-12 18:40:20 +00:00
parent beb6c638d9
commit 2e680913da
+27
View File
@@ -0,0 +1,27 @@
--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"