php-src/ext/spl/tests/bug31926.phpt
2005-12-21 22:21:54 +00:00

22 lines
397 B
PHP
Executable File

--TEST--
Bug #31926 (php in free() error with RecursiveArrayIterator)
--SKIPIF--
<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
<?php
$array = array(0 => array('world'));
$it = new RecursiveIteratorIterator(new RecursiveArrayIterator($array));
foreach($it as $key => $val) {
var_dump($key, $val);
}
?>
--EXPECT--
int(0)
string(5) "world"
--UEXPECT--
int(0)
unicode(5) "world"