3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A {} try { throw new A; } catch (\Exception $e) { var_dump($e); }
based on 0fkdE
Output for 7.0.0 - 7.2.6
Fatal error: Uncaught Error: Cannot throw objects that do not implement Throwable in /in/HrIAD:6 Stack trace: #0 {main} thrown in /in/HrIAD on line 6
Process exited with code 255.
Output for 5.3.20 - 5.6.28
Fatal error: Exceptions must be valid objects derived from the Exception base class in /in/HrIAD on line 6
Process exited with code 255.