3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php set_error_handler(function($code, $message, $filename, $line) { var_dump(1, $code, $message); die(); }); set_exception_handler(function($e) { var_dump(2, $e); }); register_shutdown_function(function() { $error = error_get_last(); var_dump(3, $error); }); try { asdas(); } catch (Trowable $e) { var_dump(4); }
based on g1MMe
Output for 7.0.0 - 7.2.0
int(2) object(Error)#4 (7) { ["message":protected]=> string(34) "Call to undefined function asdas()" ["string":"Error":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(9) "/in/MVNV3" ["line":protected]=> int(19) ["trace":"Error":private]=> array(0) { } ["previous":"Error":private]=> NULL } int(3) NULL
Output for 5.3.21 - 5.6.28
Fatal error: Call to undefined function asdas() in /in/MVNV3 on line 19 int(3) array(4) { ["type"]=> int(1) ["message"]=> string(34) "Call to undefined function asdas()" ["file"]=> string(9) "/in/MVNV3" ["line"]=> int(19) }
Process exited with code 255.