执行
$data = ['a','b','c']; foreach ($data as $k => $v) { $v = &$data[$k]; }
得到每一次的$data是
Array ( [0] => a [1] => b [2] => c ) Array ( [0] => b [1] => b [2] => c ) Array ( [0] => b [1] => c [2] => c )
这是为什么?
Helenr
相关分类