3v4l.org

run code in 300+ PHP versions simultaneously
<?php function exception_error_handler($errno, $errstr, $errfile, $errline ) { throw new ErrorException($errstr, 0, $errno, $errfile, $errline); } set_error_handler("exception_error_handler"); $arr = array(); try { $test = $arr['asd']; } catch(ErrorException $e) { var_dump($e); }
Output for git.master, git.master_jit, rfc.property-hooks
object(ErrorException)#1 (8) { ["message":protected]=> string(25) "Undefined array key "asd"" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(9) "/in/B3EYf" ["line":protected]=> int(8) ["trace":"Exception":private]=> array(1) { [0]=> array(4) { ["file"]=> string(9) "/in/B3EYf" ["line"]=> int(8) ["function"]=> string(23) "exception_error_handler" ["args"]=> array(4) { [0]=> int(2) [1]=> string(25) "Undefined array key "asd"" [2]=> string(9) "/in/B3EYf" [3]=> int(8) } } } ["previous":"Exception":private]=> NULL ["severity":protected]=> int(2) }

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:
33.94 ms | 403 KiB | 8 Q