1--TEST-- 2Creating recursive array on foreach using same variable 3--INI-- 4zend.enable_gc=1 5--FILE-- 6<?php 7 8error_reporting(E_ALL); 9 10foreach (($a = array('a' => array('a' => &$a))) as $a) { 11 var_dump($a); 12} 13 14?> 15--EXPECT-- 16array(1) { 17 ["a"]=> 18 &array(1) { 19 ["a"]=> 20 *RECURSION* 21 } 22} 23