3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php set_error_handler(function(){ print_r(debug_backtrace()); }); class x { static function y() { include '/tmp/asdf.php'; include_once '/tmp/asdf.php'; require '/tmp/asdf.php'; } } x::y();
based on gj9Nd
Output for 7.0.0 - 7.0.2, 7.0.4 - 7.0.5, 7.0.20 - 7.2.0
Array ( [0] => Array ( [file] => /in/Ac1CP [line] => 9 [function] => {closure} [args] => Array ( [0] => 2 [1] => include(/tmp/asdf.php): failed to open stream: No such file or directory [2] => /in/Ac1CP [3] => 9 [4] => Array ( ) ) ) [1] => Array ( [file] => /in/Ac1CP [line] => 9 [function] => include ) [2] => Array ( [file] => /in/Ac1CP [line] => 16 [function] => y [class] => x [type] => :: [args] => Array ( ) ) ) Array ( [0] => Array ( [file] => /in/Ac1CP [line] => 9 [function] => {closure} [args] => Array ( [0] => 2 [1] => include(): Failed opening '/tmp/asdf.php' for inclusion (include_path='.:') [2] => /in/Ac1CP [3] => 9 [4] => Array ( ) ) ) [1] => Array ( [file] => /in/Ac1CP [line] => 9 [function] => include ) [2] => Array ( [file] => /in/Ac1CP [line] => 16 [function] => y [class] => x [type] => :: [args] => Array ( ) ) ) Array ( [0] => Array ( [file] => /in/Ac1CP [line] => 10 [function] => {closure} [args] => Array ( [0] => 2 [1] => include_once(/tmp/asdf.php): failed to open stream: No such file or directory [2] => /in/Ac1CP [3] => 10 [4] => Array ( ) ) ) [1] => Array ( [file] => /in/Ac1CP [line] => 10 [function] => include_once ) [2] => Array ( [file] => /in/Ac1CP [line] => 16 [function] => y [class] => x [type] => :: [args] => Array ( ) ) ) Array ( [0] => Array ( [file] => /in/Ac1CP [line] => 10 [function] => {closure} [args] => Array ( [0] => 2 [1] => include_once(): Failed opening '/tmp/asdf.php' for inclusion (include_path='.:') [2] => /in/Ac1CP [3] => 10 [4] => Array ( ) ) ) [1] => Array ( [file] => /in/Ac1CP [line] => 10 [function] => include_once ) [2] => Array ( [file] => /in/Ac1CP [line] => 16 [function] => y [class] => x [type] => :: [args] => Array ( ) ) ) Array ( [0] => Array ( [file] => /in/Ac1CP [line] => 11 [function] => {closure} [args] => Array ( [0] => 2 [1] => require(/tmp/asdf.php): failed to open stream: No such file or directory [2] => /in/Ac1CP [3] => 11 [4] => Array ( ) ) ) [1] => Array ( [file] => /in/Ac1CP [line] => 11 [function] => require ) [2] => Array ( [file] => /in/Ac1CP [line] => 16 [function] => y [class] => x [type] => :: [args] => Array ( ) ) ) Fatal error: require(): Failed opening required '/tmp/asdf.php' (include_path='.:') in /in/Ac1CP on line 11
Process exited with code 255.
Output for 5.5.25 - 5.5.28, 5.5.30 - 5.5.31, 5.5.33 - 5.5.34, 5.6.8 - 5.6.10, 5.6.12, 5.6.14 - 5.6.18, 7.0.3, 7.0.6
Output for 5.3.20 - 5.5.24, 5.5.29, 5.5.32, 5.5.35, 5.6.11, 5.6.13, 5.6.19 - 5.6.28
Array ( [0] => Array ( [file] => /in/Ac1CP [line] => 9 [function] => {closure} [args] => Array ( [0] => 2 [1] => include(/tmp/asdf.php): failed to open stream: No such file or directory [2] => /in/Ac1CP [3] => 9 [4] => Array ( ) ) ) [1] => Array ( [file] => /in/Ac1CP [line] => 9 [function] => y [class] => x [type] => :: ) [2] => Array ( [file] => /in/Ac1CP [line] => 16 [function] => y [class] => x [type] => :: [args] => Array ( ) ) ) Array ( [0] => Array ( [file] => /in/Ac1CP [line] => 9 [function] => {closure} [args] => Array ( [0] => 2 [1] => include(): Failed opening '/tmp/asdf.php' for inclusion (include_path='.:') [2] => /in/Ac1CP [3] => 9 [4] => Array ( ) ) ) [1] => Array ( [file] => /in/Ac1CP [line] => 9 [function] => y [class] => x [type] => :: ) [2] => Array ( [file] => /in/Ac1CP [line] => 16 [function] => y [class] => x [type] => :: [args] => Array ( ) ) ) Array ( [0] => Array ( [file] => /in/Ac1CP [line] => 10 [function] => {closure} [args] => Array ( [0] => 2 [1] => include_once(/tmp/asdf.php): failed to open stream: No such file or directory [2] => /in/Ac1CP [3] => 10 [4] => Array ( ) ) ) [1] => Array ( [file] => /in/Ac1CP [line] => 10 [function] => y [class] => x [type] => :: ) [2] => Array ( [file] => /in/Ac1CP [line] => 16 [function] => y [class] => x [type] => :: [args] => Array ( ) ) ) Array ( [0] => Array ( [file] => /in/Ac1CP [line] => 10 [function] => {closure} [args] => Array ( [0] => 2 [1] => include_once(): Failed opening '/tmp/asdf.php' for inclusion (include_path='.:') [2] => /in/Ac1CP [3] => 10 [4] => Array ( ) ) ) [1] => Array ( [file] => /in/Ac1CP [line] => 10 [function] => y [class] => x [type] => :: ) [2] => Array ( [file] => /in/Ac1CP [line] => 16 [function] => y [class] => x [type] => :: [args] => Array ( ) ) ) Array ( [0] => Array ( [file] => /in/Ac1CP [line] => 11 [function] => {closure} [args] => Array ( [0] => 2 [1] => require(/tmp/asdf.php): failed to open stream: No such file or directory [2] => /in/Ac1CP [3] => 11 [4] => Array ( ) ) ) [1] => Array ( [file] => /in/Ac1CP [line] => 11 [function] => y [class] => x [type] => :: ) [2] => Array ( [file] => /in/Ac1CP [line] => 16 [function] => y [class] => x [type] => :: [args] => Array ( ) ) ) Fatal error: require(): Failed opening required '/tmp/asdf.php' (include_path='.:') in /in/Ac1CP on line 11
Process exited with code 255.