3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a[0]; /* throw new MyException('This is a really bad error', 123); final public ExceptionException::getPrevious ( void ) error_reporting(E_ALL); function exception_error_handler($errno, $errstr, $errfile, $errline ) { throw new ErrorException($errstr, '00007600', $errno, $errfile, $errline, new Exception('jjj')); } set_error_handler("exception_error_handler"); try { echo $x; } catch(Exception $e) { var_dump($e->getPrevious()); }*/
Output for 5.0.4 - 7.2.0
Notice: Undefined variable: a in /in/Z8ovI on line 3
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: a in /in/Z8ovI on line 3