3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { echo "1 try\n"; try { echo "2 try\n"; // 必ず try 中で例外が投げられる throw new \Exception("in try exception"); } catch(\Exception $e) { echo "3 catch\n"; echo " ". $e->getMessage()."\n"; throw $e;// ここで try 由来の例外を更に上に投げる } finally { echo "4 finally\n"; // finally 中でも例外を投げる throw new \Exception("in finally exception"); } } catch(\Exception $e) { // ↑の投げられた例外をキャッチ echo "5 catch\n"; echo " ". $e->getMessage()."\n"; } finally { echo "6 finally\n"; }

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
150.71 ms | 1967 KiB | 8 Q