3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class DBException extends Exception {} try { throw new DBException('Oops!'); } catch (DBException $e) { echo "Caught DBException\n"; } catch (Exception $e) { echo "Caught Exception\n"; }
based on 3CvgX
Output for 5.3.20 - 7.2.0
Caught DBException