3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function exception_error_handler($errno, $errstr, $errfile, $errline) { var_dump($errstr); } set_error_handler("exception_error_handler", error_reporting()); register_shutdown_function( "fatal_handler" ); function fatal_handler() { $errfile = "unknown file"; $errstr = "shutdown"; $errno = E_CORE_ERROR; $errline = 0; $error = error_get_last(); if( $error !== NULL) { $errno = $error["type"]; $errfile = $error["file"]; $errline = $error["line"]; $errstr = $error["message"]; } echo $errstr; } require __DIR__ . '/../src/E2EX/Converter.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/EkQoU on line 37 require(): Failed opening required '/in/../src/E2EX/Converter.php' (include_path='.:')
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/EkQoU:37 Stack trace: #0 {main} Error: File not found: /in/../src/E2EX/Converter.php in /in/EkQoU:37 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.10.0
Fatal error: File not found: /in/../src/E2EX/Converter.php in /in/EkQoU on line 37 string(45) "File not found: /in/../src/E2EX/Converter.php" File not found: /in/../src/E2EX/Converter.php
Output for 5.2.0 - 5.2.17
string(53) "Use of undefined constant __DIR__ - assumed '__DIR__'" string(92) "require(__DIR__/../src/E2EX/Converter.php): failed to open stream: No such file or directory" Fatal error: require(): Failed opening required '__DIR__/../src/E2EX/Converter.php' (include_path='.:') in /in/EkQoU on line 37 require(): Failed opening required '__DIR__/../src/E2EX/Converter.php' (include_path='.:')
Process exited with code 255.
Output for 5.1.0 - 5.1.6
string(53) "Use of undefined constant __DIR__ - assumed '__DIR__'" string(92) "require(__DIR__/../src/E2EX/Converter.php): failed to open stream: No such file or directory" Fatal error: require(): Failed opening required '__DIR__/../src/E2EX/Converter.php' (include_path='.:') in /in/EkQoU on line 37 Fatal error: Call to undefined function error_get_last() in /in/EkQoU on line 25
Process exited with code 255.
Output for 5.0.0 - 5.0.5
string(53) "Use of undefined constant __DIR__ - assumed '__DIR__'" string(89) "main(__DIR__/../src/E2EX/Converter.php): failed to open stream: No such file or directory" Fatal error: main(): Failed opening required '__DIR__/../src/E2EX/Converter.php' (include_path='.:') in /in/EkQoU on line 37 Fatal error: Call to undefined function error_get_last() in /in/EkQoU on line 25
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Warning: Wrong parameter count for set_error_handler() in /in/EkQoU on line 7 Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/EkQoU on line 37 Warning: main(__DIR__/../src/E2EX/Converter.php): failed to open stream: No such file or directory in /in/EkQoU on line 37 Fatal error: main(): Failed opening required '__DIR__/../src/E2EX/Converter.php' (include_path='.:') in /in/EkQoU on line 37 Fatal error: Call to undefined function: error_get_last() in /in/EkQoU on line 25
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Warning: Wrong parameter count for set_error_handler() in /in/EkQoU on line 7 Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/EkQoU on line 37 Warning: main(__DIR__/../src/E2EX/Converter.php): failed to open stream: No such file or directory in /in/EkQoU on line 37 Fatal error: main(): Failed opening required '__DIR__/../src/E2EX/Converter.php' (include_path='.:') in /in/EkQoU on line 37 Fatal error: Call to undefined function: error_get_last() in /in/EkQoU on line 25
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: Wrong parameter count for set_error_handler() in /in/EkQoU on line 7 Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/EkQoU on line 37 Warning: main(__DIR__/../src/E2EX/Converter.php) [http://www.php.net/function.main]: failed to create stream: No such file or directory in /in/EkQoU on line 37 Fatal error: main() [http://www.php.net/function.main]: Failed opening required '__DIR__/../src/E2EX/Converter.php' (include_path='.:') in /in/EkQoU on line 37 Fatal error: Call to undefined function: error_get_last() in /in/EkQoU on line 25