php-src/Zend/tests/foreach_002.phpt

23 lines
289 B
Plaintext
Raw Normal View History

2008-03-12 20:58:12 +08:00
--TEST--
Creating recursive array on foreach using same variable
--INI--
zend.enable_gc=1
2008-03-12 20:58:12 +08:00
--FILE--
<?php
error_reporting(E_ALL);
foreach (($a = array('a' => array('a' => &$a))) as $a) {
var_dump($a);
}
?>
--EXPECT--
array(1) {
["a"]=>
&array(1) {
["a"]=>
*RECURSION*
2008-03-12 20:58:12 +08:00
}
}