3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test($x) {//注意非&参数 $x[0] = 8; $x[1] = 9; } $arr = array(1, 2); $alias = &$arr[1]; var_dump($arr); test($arr); var_dump($arr);
Output for 4.3.0 - 7.2.6
array(2) { [0]=> int(1) [1]=> &int(2) } array(2) { [0]=> int(1) [1]=> &int(9) }