php-src/Zend/tests/each_003.phpt
Rasmus Lerdorf 388624d359 These tests all have intentional circular references
and they will leak and cause failures unless gc is enabled
2015-01-24 16:06:18 -08:00

27 lines
260 B
PHP

--TEST--
Testing each() with recursion
--INI--
zend.enable_gc=1
--FILE--
<?php
$a = array(array());
$a[] =& $a;
var_dump(each($a[1]));
?>
--EXPECTF--
array(4) {
[1]=>
array(0) {
}
["value"]=>
array(0) {
}
[0]=>
int(0)
["key"]=>
int(0)
}