3v4l.org

run code in 300+ PHP versions simultaneously
<?php class KillMe { public function __destruct() { echo 'Thank you!'; } } function err($ignored) { throw new Exception; } function foo() { $k = new KillMe; err($k); } try { foo(); } catch ( Exception $e ) { echo 'Handling error. Destructor has not yet fired.'; }

This is an error 500

There are `>1` results


preferences:
131.4 ms | 997 KiB | 7 Q