3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* getMessage ( void ) final public ExceptionException::getPrevious ( void ) final public mixedException::getCode ( void ) final public stringException::getFile ( void ) final public arrayException::getTrace ( void ) final public stringException::getTraceAsString ( void ) public string Exception::__toString ( void ) final private voidException::__clone ( void ) */ error_reporting(E_ALL); function exception_error_handler($errno, $errstr, $errfile, $errline ) { throw new ErrorException($errstr, 0, $errno, $errfile, $errline); } set_error_handler("exception_error_handler"); try { echo $x; } catch(Exception $e) { echo $e->getLine(); }
Output for git.master, git.master_jit, rfc.property-hooks
22

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:
49.41 ms | 401 KiB | 8 Q