3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class NotFoundException extends \Exception {} class SomethingNotFoundException extends NotFoundException {} class SomethingParticularNotFoundException extends SomethingNotFoundException {} try { throw new SomethingParticularNotFoundException("Well done!"); } catch (NotFoundException $e) { echo $e->getMessage(); }
Output for 5.6.0 - 5.6.38, hhvm-3.15.4, 7.0.0 - 7.3.1
Well done!