3v4l.org

run code in 300+ PHP versions simultaneously
<?php function lpErrorHandler($no,$str, $file,$line,$varList) { print_r($varList); throw new ErrorException($str,0,$no,$file,$line); return true; } set_error_handler("lpErrorHandler"); class_exists($name,false);
Output for 8.0.0alpha1 - beta3
Fatal error: Uncaught ArgumentCountError: Too few arguments to function lpErrorHandler(), 4 passed and exactly 5 expected in /in/jlHuC:3 Stack trace: #0 /in/jlHuC(14): lpErrorHandler(2, 'Undefined varia...', '/in/jlHuC', 14) #1 {main} thrown in /in/jlHuC on line 3
Process exited with code 255.
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.21, 7.4.0 - 7.4.10
Array ( [_GET] => Array ( ) [_POST] => Array ( ) [_COOKIE] => Array ( ) [_FILES] => Array ( ) [argv] => Array ( [0] => /in/jlHuC ) [argc] => 1 [_SERVER] => Array ( [TERM] => xterm [PATH] => /usr/bin:/bin [LANG] => C [SHELL] => /bin/sh [MAIL] => /var/mail/nobody [LOGNAME] => nobody [USER] => nobody [HOME] => /tmp [PHP_SELF] => /in/jlHuC [SCRIPT_NAME] => /in/jlHuC [SCRIPT_FILENAME] => /in/jlHuC [PATH_TRANSLATED] => /in/jlHuC [DOCUMENT_ROOT] => [REQUEST_TIME_FLOAT] => 1358084883.0001 [REQUEST_TIME] => 1358084883 [argv] => Array ( [0] => /in/jlHuC ) [argc] => 1 ) ) Fatal error: Uncaught ErrorException: Undefined variable: name in /in/jlHuC:14 Stack trace: #0 /in/jlHuC(14): lpErrorHandler(8, 'Undefined varia...', '/in/jlHuC', 14, Array) #1 {main} thrown in /in/jlHuC on line 14
Process exited with code 255.
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
Array ( [_GET] => Array ( ) [_POST] => Array ( ) [_COOKIE] => Array ( ) [_FILES] => Array ( ) [argv] => Array ( [0] => /in/jlHuC ) [argc] => 1 [_SERVER] => Array ( [TERM] => xterm [PATH] => /usr/bin:/bin [LANG] => C [SHELL] => /bin/sh [MAIL] => /var/mail/nobody [LOGNAME] => nobody [USER] => nobody [HOME] => /tmp [PHP_SELF] => /in/jlHuC [SCRIPT_NAME] => /in/jlHuC [SCRIPT_FILENAME] => /in/jlHuC [PATH_TRANSLATED] => /in/jlHuC [DOCUMENT_ROOT] => [REQUEST_TIME_FLOAT] => 1358084883.0001 [REQUEST_TIME] => 1358084883 [argv] => Array ( [0] => /in/jlHuC ) [argc] => 1 ) ) Fatal error: Uncaught exception 'ErrorException' with message 'Undefined variable: name' in /in/jlHuC:14 Stack trace: #0 /in/jlHuC(14): lpErrorHandler(8, 'Undefined varia...', '/in/jlHuC', 14, Array) #1 {main} thrown in /in/jlHuC on line 14
Process exited with code 255.
Output for 5.3.0 - 5.3.29
Array ( [GLOBALS] => Array *RECURSION* [_ENV] => Array ( [TERM] => xterm [PATH] => /usr/bin:/bin [LANG] => C [SHELL] => /bin/sh [MAIL] => /var/mail/nobody [LOGNAME] => nobody [USER] => nobody [HOME] => /tmp ) [HTTP_ENV_VARS] => Array ( [TERM] => xterm [PATH] => /usr/bin:/bin [LANG] => C [SHELL] => /bin/sh [MAIL] => /var/mail/nobody [LOGNAME] => nobody [USER] => nobody [HOME] => /tmp ) [argv] => Array ( [0] => /in/jlHuC ) [argc] => 1 [_POST] => Array ( ) [HTTP_POST_VARS] => Array ( ) [_GET] => Array ( ) [HTTP_GET_VARS] => Array ( ) [_COOKIE] => Array ( ) [HTTP_COOKIE_VARS] => Array ( ) [_SERVER] => Array ( [TERM] => xterm [PATH] => /usr/bin:/bin [LANG] => C [SHELL] => /bin/sh [MAIL] => /var/mail/nobody [LOGNAME] => nobody [USER] => nobody [HOME] => /tmp [PHP_SELF] => /in/jlHuC [SCRIPT_NAME] => /in/jlHuC [SCRIPT_FILENAME] => /in/jlHuC [PATH_TRANSLATED] => /in/jlHuC [DOCUMENT_ROOT] => [REQUEST_TIME] => 1358084883 [argv] => Array ( [0] => /in/jlHuC ) [argc] => 1 ) [HTTP_SERVER_VARS] => Array ( [TERM] => xterm [PATH] => /usr/bin:/bin [LANG] => C [SHELL] => /bin/sh [MAIL] => /var/mail/nobody [LOGNAME] => nobody [USER] => nobody [HOME] => /tmp [PHP_SELF] => /in/jlHuC [SCRIPT_NAME] => /in/jlHuC [SCRIPT_FILENAME] => /in/jlHuC [PATH_TRANSLATED] => /in/jlHuC [DOCUMENT_ROOT] => [REQUEST_TIME] => 1358084883 [argv] => Array ( [0] => /in/jlHuC ) [argc] => 1 ) [_FILES] => Array ( ) [HTTP_POST_FILES] => Array ( ) [_REQUEST] => Array ( ) ) Fatal error: Uncaught exception 'ErrorException' with message 'Undefined variable: name' in /in/jlHuC:14 Stack trace: #0 /in/jlHuC(14): lpErrorHandler(8, 'Undefined varia...', '/in/jlHuC', 14, Array) #1 {main} thrown in /in/jlHuC on line 14
Process exited with code 255.
Output for 5.2.3 - 5.2.17
Array ( [GLOBALS] => Array *RECURSION* [_ENV] => Array ( [TERM] => xterm [PATH] => /usr/bin:/bin [LANG] => C [SHELL] => /bin/sh [MAIL] => /var/mail/nobody [LOGNAME] => nobody [USER] => nobody [HOME] => /tmp ) [HTTP_ENV_VARS] => Array ( [TERM] => xterm [PATH] => /usr/bin:/bin [LANG] => C [SHELL] => /bin/sh [MAIL] => /var/mail/nobody [LOGNAME] => nobody [USER] => nobody [HOME] => /tmp ) [argv] => Array ( [0] => /in/jlHuC ) [argc] => 1 [_POST] => Array ( ) [HTTP_POST_VARS] => Array ( ) [_GET] => Array ( ) [HTTP_GET_VARS] => Array ( ) [_COOKIE] => Array ( ) [HTTP_COOKIE_VARS] => Array ( ) [_SERVER] => Array ( [TERM] => xterm [PATH] => /usr/bin:/bin [LANG] => C [SHELL] => /bin/sh [MAIL] => /var/mail/nobody [LOGNAME] => nobody [USER] => nobody [HOME] => /tmp [PHP_SELF] => /in/jlHuC [SCRIPT_NAME] => /in/jlHuC [SCRIPT_FILENAME] => /in/jlHuC [PATH_TRANSLATED] => /in/jlHuC [DOCUMENT_ROOT] => [REQUEST_TIME] => 1358084883 [argv] => Array ( [0] => /in/jlHuC ) [argc] => 1 ) [HTTP_SERVER_VARS] => Array ( [TERM] => xterm [PATH] => /usr/bin:/bin [LANG] => C [SHELL] => /bin/sh [MAIL] => /var/mail/nobody [LOGNAME] => nobody [USER] => nobody [HOME] => /tmp [PHP_SELF] => /in/jlHuC [SCRIPT_NAME] => /in/jlHuC [SCRIPT_FILENAME] => /in/jlHuC [PATH_TRANSLATED] => /in/jlHuC [DOCUMENT_ROOT] => [REQUEST_TIME] => 1358084883 [argv] => Array ( [0] => /in/jlHuC ) [argc] => 1 ) [_FILES] => Array ( ) [HTTP_POST_FILES] => Array ( ) [_REQUEST] => Array ( ) ) Fatal error: Uncaught exception 'ErrorException' with message 'Undefined variable: name' in /in/jlHuC:14 Stack trace: #0 /in/jlHuC(14): lpErrorHandler() #1 {main} thrown in /in/jlHuC on line 14
Process exited with code 255.
Output for 5.1.0 - 5.1.6, 5.2.0 - 5.2.2
Array ( [GLOBALS] => Array *RECURSION* [_ENV] => Array ( [TERM] => xterm [PATH] => /usr/bin:/bin [LANG] => C [SHELL] => /bin/sh [MAIL] => /var/mail/nobody [LOGNAME] => nobody [USER] => nobody [HOME] => /tmp ) [HTTP_ENV_VARS] => Array ( [TERM] => xterm [PATH] => /usr/bin:/bin [LANG] => C [SHELL] => /bin/sh [MAIL] => /var/mail/nobody [LOGNAME] => nobody [USER] => nobody [HOME] => /tmp ) [argv] => Array ( [0] => /in/jlHuC ) [argc] => 1 [_POST] => Array ( ) [HTTP_POST_VARS] => Array ( ) [_GET] => Array ( ) [HTTP_GET_VARS] => Array ( ) [_COOKIE] => Array ( ) [HTTP_COOKIE_VARS] => Array ( ) [_SERVER] => Array ( [TERM] => xterm [PATH] => /usr/bin:/bin [LANG] => C [SHELL] => /bin/sh [MAIL] => /var/mail/nobody [LOGNAME] => nobody [USER] => nobody [HOME] => /tmp [PHP_SELF] => [REQUEST_TIME] => 1358084883 [argv] => Array ( [0] => /in/jlHuC ) [argc] => 1 ) [HTTP_SERVER_VARS] => Array ( [TERM] => xterm [PATH] => /usr/bin:/bin [LANG] => C [SHELL] => /bin/sh [MAIL] => /var/mail/nobody [LOGNAME] => nobody [USER] => nobody [HOME] => /tmp [PHP_SELF] => [REQUEST_TIME] => 1358084883 [argv] => Array ( [0] => /in/jlHuC ) [argc] => 1 ) [_FILES] => Array ( ) [HTTP_POST_FILES] => Array ( ) [_REQUEST] => Array ( ) ) Fatal error: Uncaught exception 'ErrorException' with message 'Undefined variable: name' in /in/jlHuC:14 Stack trace: #0 /in/jlHuC(14): lpErrorHandler() #1 {main} thrown in /in/jlHuC on line 14
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Array ( [GLOBALS] => Array *RECURSION* [_ENV] => Array ( [TERM] => xterm [PATH] => /usr/bin:/bin [LANG] => C [SHELL] => /bin/sh [MAIL] => /var/mail/nobody [LOGNAME] => nobody [USER] => nobody [HOME] => /tmp ) [HTTP_ENV_VARS] => Array ( [TERM] => xterm [PATH] => /usr/bin:/bin [LANG] => C [SHELL] => /bin/sh [MAIL] => /var/mail/nobody [LOGNAME] => nobody [USER] => nobody [HOME] => /tmp ) [argv] => Array ( [0] => /in/jlHuC ) [argc] => 1 [_POST] => Array ( ) [HTTP_POST_VARS] => Array ( ) [_GET] => Array ( ) [HTTP_GET_VARS] => Array ( ) [_COOKIE] => Array ( ) [HTTP_COOKIE_VARS] => Array ( ) [_SERVER] => Array ( [TERM] => xterm [PATH] => /usr/bin:/bin [LANG] => C [SHELL] => /bin/sh [MAIL] => /var/mail/nobody [LOGNAME] => nobody [USER] => nobody [HOME] => /tmp [PHP_SELF] => [argv] => Array ( [0] => /in/jlHuC ) [argc] => 1 ) [HTTP_SERVER_VARS] => Array ( [TERM] => xterm [PATH] => /usr/bin:/bin [LANG] => C [SHELL] => /bin/sh [MAIL] => /var/mail/nobody [LOGNAME] => nobody [USER] => nobody [HOME] => /tmp [PHP_SELF] => [argv] => Array ( [0] => /in/jlHuC ) [argc] => 1 ) [_FILES] => Array ( ) [HTTP_POST_FILES] => Array ( ) [_REQUEST] => Array ( ) ) Fatal error: Class 'ErrorException' not found in /in/jlHuC on line 7
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_NEW in /in/jlHuC on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1
Parse error: parse error, unexpected T_NEW in /in/jlHuC on line 7
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/jlHuC on line 7
Process exited with code 255.