summaryrefslogtreecommitdiff
path: root/Zend/tests/foreach_002.phpt
blob: 77fe20cb64cfd65f370b2bcb659636a79c579445 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--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*
  }
}