summaryrefslogtreecommitdiff
path: root/Zend/tests/foreach_002.phpt
blob: 23e21d640bc2ea8c176327a9a53bdaa9acecea74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--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"]=>
  *RECURSION*
}