3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { /** * @return resource */ public function baz() { throw new \Exception(); } public function bar(): void { try { $handle = $this->baz(); } finally { echo isset($handle) ? 'ok' : 'ko'; } } } (new Foo())->bar();

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
149.93 ms | 2048 KiB | 8 Q