3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Test { public function action(){ throw new Exception('destroyer ?'); } public function __destruct(){ echo "i'm dying"; } } $o = new Test(); $o->action(); try { $o->action(); } catch(Exception $ex){ echo $ex->getMessage(); }
based on MePlH
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Exception: destroyer ? in /in/WA6kS:5 Stack trace: #0 /in/WA6kS(12): Test->action() #1 {main} thrown in /in/WA6kS on line 5
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'destroyer ?' in /in/WA6kS:5 Stack trace: #0 /in/WA6kS(12): Test->action() #1 {main} thrown in /in/WA6kS on line 5
Process exited with code 255.