3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function x(): void {} } set_error_handler(function() { echo 'handled'; }); register_shutdown_function(function() { echo 'shutdown...'; }); echo 'before test...'; try { if (time() > 0) { // wrap in if to make sure an error is not throw at compile time class B extends A { public function x() {} } } } catch (\Throwable $e) { echo 'catched'; }

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
155.4 ms | 1356 KiB | 13 Q