3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function () { var_dump(func_get_args()); }); eval(' $a++; ');
based on GkVNU
Output for 8.0.0 - 8.0.3
array(4) { [0]=> int(2) [1]=> string(21) "Undefined variable $a" [2]=> string(28) "/in/fE1JI(7) : eval()'d code" [3]=> int(2) }
Output for 7.3.0 - 7.3.27, 7.4.0 - 7.4.16
array(5) { [0]=> int(8) [1]=> string(21) "Undefined variable: a" [2]=> string(28) "/in/fE1JI(7) : eval()'d code" [3]=> int(2) [4]=> array(8) { ["_GET"]=> array(0) { } ["_POST"]=> array(0) { } ["_COOKIE"]=> array(0) { } ["_FILES"]=> array(0) { } ["argv"]=> array(1) { [0]=> string(9) "/in/fE1JI" } ["argc"]=> int(1) ["_SERVER"]=> array(17) { ["TERM"]=> string(5) "xterm" ["PATH"]=> string(13) "/usr/bin:/bin" ["LANG"]=> string(1) "C" ["SHELL"]=> string(7) "/bin/sh" ["MAIL"]=> string(16) "/var/mail/nobody" ["LOGNAME"]=> string(6) "nobody" ["USER"]=> string(6) "nobody" ["HOME"]=> string(4) "/tmp" ["PHP_SELF"]=> string(9) "/in/fE1JI" ["SCRIPT_NAME"]=> string(9) "/in/fE1JI" ["SCRIPT_FILENAME"]=> string(9) "/in/fE1JI" ["PATH_TRANSLATED"]=> string(9) "/in/fE1JI" ["DOCUMENT_ROOT"]=> string(0) "" ["REQUEST_TIME_FLOAT"]=> float(1618944968.0001) ["REQUEST_TIME"]=> int(1618944968) ["argv"]=> array(1) { [0]=> string(9) "/in/fE1JI" } ["argc"]=> int(1) } ["a"]=> NULL } }