3v4l.org

run code in 150+ 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 - 5.6.28, 7.0.0 - 7.1.0
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
Output for hhvm-3.10.0 - 3.12.0
Notice: Use of undefined constant a1 - assumed 'a1' in /in/Qj973(5)(43b0ae058330c50083ca72c62e23381c) : eval()'d code on line 1 Notice: Use of undefined constant a2 - assumed 'a2' in /in/Qj973(5)(43b0ae058330c50083ca72c62e23381c) : eval()'d code on line 1 Notice: Use of undefined constant a3 - assumed 'a3' in /in/Qj973(5)(43b0ae058330c50083ca72c62e23381c) : eval()'d code on line 1 Notice: Use of undefined constant a4 - assumed 'a4' in /in/Qj973(5)(43b0ae058330c50083ca72c62e23381c) : eval()'d code on line 1 Notice: Use of undefined constant a5 - assumed 'a5' in /in/Qj973(5)(43b0ae058330c50083ca72c62e23381c) : eval()'d code on line 1