xref: /PHP-5.4/Zend/tests/foreach_002.phpt (revision fa762634)
1--TEST--
2Creating recursive array on foreach using same variable
3--FILE--
4<?php
5
6error_reporting(E_ALL);
7
8foreach (($a = array('a' => array('a' => &$a))) as $a) {
9	var_dump($a);
10}
11
12?>
13--EXPECT--
14array(1) {
15  ["a"]=>
16  &array(1) {
17    ["a"]=>
18    *RECURSION*
19  }
20}
21