1--TEST-- 2GH-12826 (Weird pointers issue in nested loops) 3--FILE-- 4<?php 5$test = array( 6 'a' => 1, 7 'b' => 2, 8 'c' => 3, 9 'd' => 4, 10); 11 12unset($test['a']); 13unset($test['b']); 14 15foreach($test as $k => &$v) { // Mind the reference! 16 echo "Pass $k : "; 17 18 foreach($test as $kk => $vv) { 19 echo $test[$kk]; 20 if ($kk == $k) $test[$kk] = 0; 21 } 22 23 echo "\n"; 24} 25 26unset($v); 27?> 28--EXPECT-- 29Pass c : 34 30Pass d : 04 31