3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class UberException extends Exception { public function __construct() { $refTrace = new ReflectionProperty('Exception', 'trace'); $refTrace->setAccessible(true); $refTrace->setValue($this, array(array('file' => 'data.php', 'line' => 20, 'function' => 'super', 'args' => array())); } } function test() { throw new UberException(); } try { test(); } catch (Exception $e) { var_dump($e->getTrace()); throw $e; }
Output for 5.3.0 - 5.4.17
Parse error: syntax error, unexpected ';' in /in/mAlsc on line 9
Process exited with code 255.