mirror of
https://github.com/php/php-src.git
synced 2024-12-19 15:00:15 +08:00
388624d359
and they will leak and cause failures unless gc is enabled
23 lines
289 B
PHP
23 lines
289 B
PHP
--TEST--
|
|
Creating recursive array on foreach using same variable
|
|
--INI--
|
|
zend.enable_gc=1
|
|
--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*
|
|
}
|
|
}
|