3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php /*E_ERROR */ function exception_error_handler($errno, $errstr, $errfile, $errline) { var_dump($errstr); } set_error_handler("exception_error_handler", error_reporting()); function shutDownFunction() { echo 'as'; $error = error_get_last(); if ($error['type'] == 1) { //do your stuff } } register_shutdown_function('shutdownFunction'); require __DIR__ . '/../src/E2EX/Converter.php'; require __DIR__ . '/../src/E2EX/FatalErrorException.php'; function exceptionHandler(E2EX\FatalErrorException $e) { echo "Exception handler got triggered with message '{$e->getMessage()}'\n"; } error_reporting(0); set_exception_handler('exceptionHandler'); E2EX\Converter::register(E_ALL); require_once __DIR__ .'/includes/e_error.inc.php';
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
string(88) "require(/in/../src/E2EX/Converter.php): failed to open stream: No such file or directory" Fatal error: require(): Failed opening required '/in/../src/E2EX/Converter.php' (include_path='.:') in /in/bf4uZ on line 28 as
Process exited with code 255.
Output for hhvm-3.12.0
Fatal error: Uncaught Error: File not found: /in/../src/E2EX/Converter.php in /in/bf4uZ:28 Stack trace: #0 {main} as
Process exited with code 255.
Output for hhvm-3.10.0
Fatal error: File not found: /in/../src/E2EX/Converter.php in /in/bf4uZ on line 28 string(45) "File not found: /in/../src/E2EX/Converter.php" as
Output for 5.1.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/bf4uZ on line 31 Parse error: syntax error, unexpected T_STRING, expecting '&' or T_VARIABLE in /in/bf4uZ on line 31
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/bf4uZ on line 31 Parse error: parse error, unexpected T_STRING, expecting '&' or T_VARIABLE in /in/bf4uZ on line 31
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting ')' in /in/bf4uZ on line 31
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting ')' in /in/bf4uZ on line 31
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/bf4uZ on line 31
Process exited with code 255.