3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr = array(1); $a =& $arr[0]; //$a and $arr[0] are in the same reference set $arr2 = $arr; //not an assignment-by-reference! $arr2[0]++; var_export($a); echo '<br/>'; var_export($arr); echo '<br/>'; var_export($arr2);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
2<br/>array ( 0 => 2, )<br/>array ( 0 => 2, )