3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (!interface_exists('Throwable', false)) { interface Throwable { } } if (!class_exists('Error', false)) { // We can't really avoid making this extend Exception in PHP 5. class Error extends Exception implements Throwable { } } if (!class_exists('TypeError', false)) { class TypeError extends Error { } }

preferences:
54.63 ms | 402 KiB | 5 Q