3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyException extends Exception { } class MyOtherException extends Exception { } class Test { public function testing() { try { throw new MyException(); } catch (MyException|MyOtherException $e) { var_dump(get_class($e)); } } } $foo = new Test; $foo->testing();

preferences:
41.23 ms | 402 KiB | 5 Q