3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Test { public function __destruct() { echo 'destruct', PHP_EOL; } public function __construct() { echo 'construct', PHP_EOL; } } echo 'start', PHP_EOL; new Test(); throw new Exception(); echo 'stop', PHP_EOL;
based on j5Lrm
Output for 7.0.0 - 7.2.0
start construct destruct Fatal error: Uncaught Exception in /in/obEDd:19 Stack trace: #0 {main} thrown in /in/obEDd on line 19
Process exited with code 255.
Output for 5.3.19 - 5.6.28
start construct destruct Fatal error: Uncaught exception 'Exception' in /in/obEDd:19 Stack trace: #0 {main} thrown in /in/obEDd on line 19
Process exited with code 255.