3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_time_limit( 1 ); function f() { $foo = null; try { echo "...\n"; class Foo implements Throwable {} } catch ( Error $e ) { echo "----\nCaught error: $e\n----\n"; } } function f1() { f(); } set_exception_handler(function() { echo "----\nException handler: "; var_dump(func_get_args()); echo "----\n"; return false;}); set_error_handler(function() { echo "----\nError handler: "; var_dump(func_get_args()); echo "----\n"; return false;}, 0xffffffff); register_shutdown_function(function() { echo "----\nShutdown function: "; var_dump(error_get_last()); echo "----\n"; }); f1();
Output for git.master, git.master_jit, rfc.property-hooks
... Fatal error: Class Foo cannot implement interface Throwable, extend Exception or Error instead in /in/tfpvM on line 9 ---- Shutdown function: array(4) { ["type"]=> int(1) ["message"]=> string(81) "Class Foo cannot implement interface Throwable, extend Exception or Error instead" ["file"]=> string(9) "/in/tfpvM" ["line"]=> int(9) } ----
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
52.56 ms | 401 KiB | 8 Q