3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php /* final public ExceptionException::getPrevious ( void ) final public stringException::getFile ( 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, '00007600', $errno, $errfile, $errline); } set_error_handler("exception_error_handler"); try { echo $x; } catch(Exception $e) { echo $e->getTraceAsString(); }

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for Typed properties v2
#0 /in/c721W(29): exception_error_handler(8, 'Undefined varia...', '/in/c721W', 29, Array) #1 {main}
Output for Array change keys
#0 /in/c721W(29): exception_error_handler(8, 'Undefined varia...', '/in/c721W', 29, Array) #1 {main}
Output for Lexical anon
#0 /in/c721W(29): exception_error_handler(8, 'Undefined varia...', '/in/c721W', 29, Array) #1 {main}

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