3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface InterfaceA {} class ExceptionA extends Exception implements InterfaceA {} function throwException() { throw new ExceptionA(); } try { throwException(); } catch (InterfaceA $error) { printf('Caught %s', get_class($error)); }

preferences:
26.5 ms | 404 KiB | 5 Q