3v4l.org

run code in 300+ PHP versions simultaneously
<?php function exception_error_handler($severity, $message, $file, $line) { if (!(error_reporting() & $severity)) { // This error code is not included in error_reporting return; } throw new ErrorException($message, 0, $severity, $file, $line); } set_error_handler("exception_error_handler"); try { require_once 'nxx.php'; } Catch (ErrorException $e) { var_dump($e); }
Output for 8.0.3 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
object(ErrorException)#1 (8) { ["message":protected]=> string(116) "require_once(): open_basedir restriction in effect. File(nxx.php) is not within the allowed path(s): (/tmp:/in:/etc)" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(9) "/in/W1SVn" ["line":protected]=> int(12) ["trace":"Exception":private]=> array(2) { [0]=> array(4) { ["file"]=> string(9) "/in/W1SVn" ["line"]=> int(12) ["function"]=> string(23) "exception_error_handler" ["args"]=> array(4) { [0]=> int(2) [1]=> string(116) "require_once(): open_basedir restriction in effect. File(nxx.php) is not within the allowed path(s): (/tmp:/in:/etc)" [2]=> string(9) "/in/W1SVn" [3]=> int(12) } } [1]=> array(3) { ["file"]=> string(9) "/in/W1SVn" ["line"]=> int(12) ["function"]=> string(12) "require_once" } } ["previous":"Exception":private]=> NULL ["severity":protected]=> int(2) }
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 object(ErrorException)#1 (8) { ["message":protected]=> string(116) "require_once(): open_basedir restriction in effect. File(nxx.php) is not within the allowed path(s): (/tmp:/in:/etc)" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(9) "/in/W1SVn" ["line":protected]=> int(12) ["trace":"Exception":private]=> array(2) { [0]=> array(4) { ["file"]=> string(9) "/in/W1SVn" ["line"]=> int(12) ["function"]=> string(23) "exception_error_handler" ["args"]=> array(4) { [0]=> int(2) [1]=> string(116) "require_once(): open_basedir restriction in effect. File(nxx.php) is not within the allowed path(s): (/tmp:/in:/etc)" [2]=> string(9) "/in/W1SVn" [3]=> int(12) } } [1]=> array(3) { ["file"]=> string(9) "/in/W1SVn" ["line"]=> int(12) ["function"]=> string(12) "require_once" } } ["previous":"Exception":private]=> NULL ["severity":protected]=> int(2) }
Output for 8.0.13
object(ErrorException)#1 (8) { ["message":protected]=> string(71) "require_once(nxx.php): Failed to open stream: No such file or directory" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(9) "/in/W1SVn" ["line":protected]=> int(12) ["trace":"Exception":private]=> array(2) { [0]=> array(4) { ["file"]=> string(9) "/in/W1SVn" ["line"]=> int(12) ["function"]=> string(23) "exception_error_handler" ["args"]=> array(4) { [0]=> int(2) [1]=> string(71) "require_once(nxx.php): Failed to open stream: No such file or directory" [2]=> string(9) "/in/W1SVn" [3]=> int(12) } } [1]=> array(3) { ["file"]=> string(9) "/in/W1SVn" ["line"]=> int(12) ["function"]=> string(12) "require_once" } } ["previous":"Exception":private]=> NULL ["severity":protected]=> int(2) }
Output for 8.0.0 - 8.0.2
Fatal error: Uncaught ErrorException: require_once(): open_basedir restriction in effect. File(nxx.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/W1SVn:12 Stack trace: #0 /in/W1SVn(12): exception_error_handler(2, 'require_once():...', '/in/W1SVn', 12) #1 /in/W1SVn(12): require_once() #2 {main} Next Error: Failed opening required 'nxx.php' (include_path='.:') in /in/W1SVn:12 Stack trace: #0 {main} thrown in /in/W1SVn on line 12
Process exited with code 255.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.10, 7.2.0, 7.3.32 - 7.3.33, 7.4.33
Warning: Uncaught ErrorException: require_once(nxx.php): failed to open stream: No such file or directory in /in/W1SVn:12 Stack trace: #0 /in/W1SVn(12): exception_error_handler(2, 'require_once(nx...', '/in/W1SVn', 12, Array) #1 /in/W1SVn(12): require_once() #2 {main} thrown in /in/W1SVn on line 12 Fatal error: main(): Failed opening required 'nxx.php' (include_path='.:') in /in/W1SVn on line 12
Process exited with code 255.
Output for 7.1.26 - 7.1.33, 7.2.17 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.32
Warning: Uncaught ErrorException: require_once(): open_basedir restriction in effect. File(nxx.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/W1SVn:12 Stack trace: #0 /in/W1SVn(12): exception_error_handler(2, 'require_once():...', '/in/W1SVn', 12, Array) #1 /in/W1SVn(12): require_once() #2 {main} thrown in /in/W1SVn on line 12 Fatal error: main(): Failed opening required 'nxx.php' (include_path='.:') in /in/W1SVn on line 12
Process exited with code 255.
Output for 7.1.20, 7.2.6
Warning: Uncaught ErrorException: require_once(): open_basedir restriction in effect. File(nxx.php) is not within the allowed path(s): (/tmp:/in) in /in/W1SVn:12 Stack trace: #0 /in/W1SVn(12): exception_error_handler(2, 'require_once():...', '/in/W1SVn', 12, Array) #1 /in/W1SVn(12): require_once() #2 {main} thrown in /in/W1SVn on line 12 Fatal error: main(): Failed opening required 'nxx.php' (include_path='.:') in /in/W1SVn on line 12
Process exited with code 255.
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28
Warning: Uncaught exception 'ErrorException' with message 'require_once(nxx.php): failed to open stream: No such file or directory' in /in/W1SVn:12 Stack trace: #0 /in/W1SVn(12): exception_error_handler(2, 'require_once(nx...', '/in/W1SVn', 12, Array) #1 /in/W1SVn(12): require_once() #2 {main} thrown in /in/W1SVn on line 12 Fatal error: main(): Failed opening required 'nxx.php' (include_path='.:') in /in/W1SVn on line 12
Process exited with code 255.

preferences:
154.12 ms | 402 KiB | 213 Q