3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array(); $array[$key] = 12; $array["$test"] = 14; var_dump($array); echo $array[123];
Output for 5.3.0 - 5.6.21, 7.0.0 - 7.1.0
Notice: Undefined variable: key in /in/Jrhft on line 4 Notice: Undefined variable: test in /in/Jrhft on line 5 array(1) { [""]=> int(14) } Notice: Undefined offset: 123 in /in/Jrhft on line 9
Output for hhvm-3.12.0
Notice: Undefined variable: test in /in/Jrhft on line 5 array(1) { [""]=> int(14) } Notice: Undefined index: 123 in /in/Jrhft on line 9
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.0.4 - 5.2.17
Notice: Undefined variable: key in /in/Jrhft on line 4 Notice: Undefined variable: test in /in/Jrhft on line 5 array(1) { [""]=> int(14) } Notice: Undefined offset: 123 in /in/Jrhft on line 9
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: key in /in/Jrhft on line 4 Notice: Undefined variable: test in /in/Jrhft on line 5 array(1) { [""]=> int(14) } Notice: Undefined offset: 123 in /in/Jrhft on line 9