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() { eval("asdasdasd"); include '/tmp/asdf.php'; } } x::y();
based on gj9Nd
Output for 7.0.0 - 7.2.0
Parse error: syntax error, unexpected end of file in /in/sfGeO(9) : eval()'d code on line 1
Process exited with code 255.
Output for 5.4.11 - 5.5.24, 5.5.29, 5.5.32, 5.5.35, 5.6.11, 5.6.13, 5.6.19 - 5.6.28
Parse error: syntax error, unexpected end of file in /in/sfGeO(9) : eval()'d code on line 1 Array ( [0] => Array ( [file] => /in/sfGeO [line] => 10 [function] => {closure} [args] => Array ( [0] => 2 [1] => include(/tmp/asdf.php): failed to open stream: No such file or directory [2] => /in/sfGeO [3] => 10 [4] => Array ( ) ) ) [1] => Array ( [file] => /in/sfGeO [line] => 10 [function] => y [class] => x [type] => :: ) [2] => Array ( [file] => /in/sfGeO [line] => 14 [function] => y [class] => x [type] => :: [args] => Array ( ) ) ) Array ( [0] => Array ( [file] => /in/sfGeO [line] => 10 [function] => {closure} [args] => Array ( [0] => 2 [1] => include(): Failed opening '/tmp/asdf.php' for inclusion (include_path='.:') [2] => /in/sfGeO [3] => 10 [4] => Array ( ) ) ) [1] => Array ( [file] => /in/sfGeO [line] => 10 [function] => y [class] => x [type] => :: ) [2] => Array ( [file] => /in/sfGeO [line] => 14 [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
Parse error: syntax error, unexpected end of file in /in/sfGeO(9) : eval()'d code on line 1
Output for 5.4.10
Parse error: syntax error, unexpected end of file in /in/sfGeO(9) : eval()'d code on line 1 Array ( [0] => Array ( [file] => /in/sfGeO [line] => 10 [function] => {closure} [args] => Array ( [0] => 2 [1] => include(/tmp/asdf.php): failed to open stream: No such file or directory [2] => /in/sfGeO [3] => 10 [4] => Array ( ) ) ) [1] => Array ( [file] => /in/sfGeO [line] => 10 [function] => y [class] => x [type] => :: ) [2] => Array ( [file] => /in/sfGeO [line] => 14 [function] => y [class] => x [type] => :: [args] => Array ( ) ) ) Array ( [0] => Array ( [file] => /in/sfGeO [line] => 10 [function] => {closure} [args] => Array ( [0] => 2 [1] => include(): Failed opening '/tmp/asdf.php' for inclusion (include_path='.:') [2] => /in/sfGeO [3] => 10 [4] => Array ( ) ) ) [1] => Array ( [file] => /in/sfGeO [line] => 10 [function] => y [class] => x [type] => :: ) [2] => Array ( [file] => /in/sfGeO [line] => 14 [function] => y [class] => x [type] => :: [args] => Array ( ) ) )
Process exited with code 255.
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected $end in /in/sfGeO(9) : eval()'d code on line 1 Array ( [0] => Array ( [file] => /in/sfGeO [line] => 10 [function] => {closure} [args] => Array ( [0] => 2 [1] => include(/tmp/asdf.php): failed to open stream: No such file or directory [2] => /in/sfGeO [3] => 10 [4] => Array ( ) ) ) [1] => Array ( [file] => /in/sfGeO [line] => 10 [function] => y [class] => x [type] => :: ) [2] => Array ( [file] => /in/sfGeO [line] => 14 [function] => y [class] => x [type] => :: [args] => Array ( ) ) ) Array ( [0] => Array ( [file] => /in/sfGeO [line] => 10 [function] => {closure} [args] => Array ( [0] => 2 [1] => include(): Failed opening '/tmp/asdf.php' for inclusion (include_path='.:') [2] => /in/sfGeO [3] => 10 [4] => Array ( ) ) ) [1] => Array ( [file] => /in/sfGeO [line] => 10 [function] => y [class] => x [type] => :: ) [2] => Array ( [file] => /in/sfGeO [line] => 14 [function] => y [class] => x [type] => :: [args] => Array ( ) ) )
Process exited with code 255.