3v4l.org

run code in 300+ PHP versions simultaneously
<?php function error_handler($errno, $errstr, $errfile, $errline) { $a = func_get_args(); var_dump($a); } set_error_handler("error_handler"); try { $x = new NonexistantClass(); } catch (Exception $e) { var_dump($e->getMessage()); } catch (Error $e) { var_dump($e); } echo "Don't worry, everything is still fine!\n";
Output for git.master, git.master_jit, rfc.property-hooks
object(Error)#1 (7) { ["message":protected]=> string(34) "Class "NonexistantClass" not found" ["string":"Error":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(9) "/in/SJpJi" ["line":protected]=> int(11) ["trace":"Error":private]=> array(0) { } ["previous":"Error":private]=> NULL } Don't worry, everything is still fine!

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