3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php set_error_handler(function($errno, $errstr, $errfile, $errline) { print_r([ 'errno' => $errno, 'errstr' => $errstr, 'errfile' => $errfile, 'errline' => $errline, ]); }); register_shutdown_function(function() { $error = error_get_last(); print_r($error); }); @foo();
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function foo() in /in/9dPHt:17 Stack trace: #0 {main} thrown in /in/9dPHt on line 17 Array ( [type] => 1 [message] => Uncaught Error: Call to undefined function foo() in /in/9dPHt:17 Stack trace: #0 {main} thrown [file] => /in/9dPHt [line] => 17 )
Process exited with code 255.
Output for 5.4.9 - 5.6.28
Array ( [type] => 1 [message] => Call to undefined function foo() [file] => /in/9dPHt [line] => 17 )
Process exited with code 255.
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/9dPHt on line 4
Process exited with code 255.