3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr = array(1 => "Hello"); var_dump($arr); $x = "fun_arr"; function fun_arr($i) { global $arr; return $arr[i]; } echo $x(1);
Output for 5.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
array(1) { [1]=> string(5) "Hello" } Notice: Use of undefined constant i - assumed 'i' in /in/HQ1MM on line 13 Notice: Undefined index: i in /in/HQ1MM on line 13
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.3.0 - 5.2.17
array(1) { [1]=> string(5) "Hello" } Notice: Use of undefined constant i - assumed 'i' in /in/HQ1MM on line 13 Notice: Undefined index: i in /in/HQ1MM on line 13