3v4l.org

run code in 200+ 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! var_dump($arr2); $arr2[0]++; var_dump($arr2); var_dmp($a); $arr[0]++; var_dump($arr2); var_dump($arr); var_dmp($a);
Output for 7.0.0 - 7.2.0
array(1) { [0]=> &int(1) } array(1) { [0]=> &int(2) } Fatal error: Uncaught Error: Call to undefined function var_dmp() in /in/NWYmI:10 Stack trace: #0 {main} thrown in /in/NWYmI on line 10
Process exited with code 255.
Output for 5.3.20 - 5.6.28
array(1) { [0]=> &int(1) } array(1) { [0]=> &int(2) } Fatal error: Call to undefined function var_dmp() in /in/NWYmI on line 10
Process exited with code 255.