php-src/Zend/tests/foreach_002.phpt
2008-03-12 12:58:12 +00:00

24 lines
302 B
PHP

--TEST--
Creating recursive array on foreach using same variable
--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"]=>
&array(1) {
["a"]=>
*RECURSION*
}
}
}