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() { $x = false; isset($x[1][2]); include '/tmp/asdf.php'; } } x::y();
based on 0hrOp
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/nHufF [line] => 11 [function] => {closure} [args] => Array ( [0] => 2 [1] => include(/tmp/asdf.php): failed to open stream: No such file or directory [2] => /in/nHufF [3] => 11 [4] => Array ( [x] => ) ) ) [1] => Array ( [file] => /in/nHufF [line] => 11 [function] => include ) [2] => Array ( [file] => /in/nHufF [line] => 15 [function] => y [class] => x [type] => :: [args] => Array ( ) ) ) Array ( [0] => Array ( [file] => /in/nHufF [line] => 11 [function] => {closure} [args] => Array ( [0] => 2 [1] => include(): Failed opening '/tmp/asdf.php' for inclusion (include_path='.:') [2] => /in/nHufF [3] => 11 [4] => Array ( [x] => ) ) ) [1] => Array ( [file] => /in/nHufF [line] => 11 [function] => include ) [2] => Array ( [file] => /in/nHufF [line] => 15 [function] => y [class] => x [type] => :: [args] => Array ( ) ) )
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/nHufF [line] => 11 [function] => {closure} [args] => Array ( [0] => 2 [1] => include(/tmp/asdf.php): failed to open stream: No such file or directory [2] => /in/nHufF [3] => 11 [4] => Array ( [x] => ) ) ) [1] => Array ( [file] => /in/nHufF [line] => 11 [function] => y [class] => x [type] => :: ) [2] => Array ( [file] => /in/nHufF [line] => 15 [function] => y [class] => x [type] => :: [args] => Array ( ) ) ) Array ( [0] => Array ( [file] => /in/nHufF [line] => 11 [function] => {closure} [args] => Array ( [0] => 2 [1] => include(): Failed opening '/tmp/asdf.php' for inclusion (include_path='.:') [2] => /in/nHufF [3] => 11 [4] => Array ( [x] => ) ) ) [1] => Array ( [file] => /in/nHufF [line] => 11 [function] => y [class] => x [type] => :: ) [2] => Array ( [file] => /in/nHufF [line] => 15 [function] => y [class] => x [type] => :: [args] => Array ( ) ) )