3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class MyException extends Exception { } class Test { public function testing() { try { try { throw new MyException('foo!'); } catch (MyException $e) { // rethrow it throw $e; } } catch (Exception $e) { var_dump($e->getMessage()); } } } $foo = new Test; $foo->testing();
Output for 5.2.15 - 7.1.0
string(4) "foo!"