3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class X extends \TypeError { } try { try { throw new X('extended throwable'); } catch (\Throwable $t) { throw new \Exception ($t->getMessage(), 0, $t); } } catch (\Exception $ex) { echo $ex->getMessage(); }
based on UbgVM
Output for 7.0.0 - 7.2.0
extended throwable
Output for 5.3.21 - 5.6.28
Fatal error: Class 'TypeError' not found in /in/WvHeG on line 4
Process exited with code 255.