3v4l.org

run code in 300+ PHP versions simultaneously
<?php /*E_ERROR E_CORE_ERROR E_CORE_WARNING E_COMPILE_ERROR E_COMPILE_WARNING*/ function exception_error_handler($errno, $errstr, $errfile, $errline) { var_dump($errstr); } set_error_handler("exception_error_handler", error_reporting()); function shutDownFunction() { $error = error_get_last(); var_dump($error); if ($error['type'] == 1) { //do your stuff } } register_shutdown_function('shutdownFunction'); echo "\n"; echo "Hello World"; echo "\n\n"; var_dump(error_get_last()); declare(foo='bar');
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Unsupported declare 'foo' in /in/7dSJv on line 35 Hello World array(4) { ["type"]=> int(128) ["message"]=> string(25) "Unsupported declare 'foo'" ["file"]=> string(9) "/in/7dSJv" ["line"]=> int(35) } array(4) { ["type"]=> int(128) ["message"]=> string(25) "Unsupported declare 'foo'" ["file"]=> string(9) "/in/7dSJv" ["line"]=> int(35) }

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:
42.58 ms | 402 KiB | 8 Q