mirror of
https://github.com/php/php-src.git
synced 2024-12-15 04:45:03 +08:00
24 lines
302 B
PHP
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*
|
|
}
|
|
}
|
|
}
|