1--TEST-- 2"Reference Unpacking - VM Safety" list() 3--FILE-- 4<?php 5$ary = [[0, 1]]; 6[[ 7 0 => &$a, 8 ($ary["foo"] = 1) => &$b 9]] = $ary; 10 11var_dump($ary, $a, $b); 12unset($ary, $a, $b); 13 14$ary = [[0, 1]]; 15[ 16 0 => &$a, 17 ($ary["foo"] = 1) => &$b 18] = $ary[0]; 19var_dump($ary, $a, $b); 20?> 21--EXPECT-- 22array(2) { 23 [0]=> 24 array(2) { 25 [0]=> 26 &int(0) 27 [1]=> 28 &int(1) 29 } 30 ["foo"]=> 31 int(1) 32} 33int(0) 34int(1) 35array(2) { 36 [0]=> 37 array(2) { 38 [0]=> 39 &int(0) 40 [1]=> 41 &int(1) 42 } 43 ["foo"]=> 44 int(1) 45} 46int(0) 47int(1) 48