1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
--TEST-- Bug #69376 (Wrong ref counting) --FILE-- <?php function &test() { $var = array(); $var[] =& $var; return $var; }; $a = test(); $b = $a; $b[0] = 123; print_r($a); print_r($b); ?> --EXPECT-- Array ( [0] => 123 ) Array ( [0] => 123 )