3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = 'array(1=>a1, 2=>a2, 3=>a3, 4=>a4, 5=>a5);'; $array = eval($str); echo $array[1]; ?>
Output for 4.3.0 - 7.1.7
Notice: Use of undefined constant a1 - assumed 'a1' in /in/Qj973(5) : eval()'d code on line 1 Notice: Use of undefined constant a2 - assumed 'a2' in /in/Qj973(5) : eval()'d code on line 1 Notice: Use of undefined constant a3 - assumed 'a3' in /in/Qj973(5) : eval()'d code on line 1 Notice: Use of undefined constant a4 - assumed 'a4' in /in/Qj973(5) : eval()'d code on line 1 Notice: Use of undefined constant a5 - assumed 'a5' in /in/Qj973(5) : eval()'d code on line 1