3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { try { throw new \ArithmeticError("Foo"); } finally { throw new \LogicException("Bar", 0, null); } } catch (\Throwable $e) { print_r($e); }
Output for 7.4.0 - 7.4.30, 8.0.1 - 8.0.22, 8.1.0 - 8.1.9
LogicException Object ( [message:protected] => Bar [string:Exception:private] => [code:protected] => 0 [file:protected] => /in/IsrCd [line:protected] => 6 [trace:Exception:private] => Array ( ) [previous:Exception:private] => ArithmeticError Object ( [message:protected] => Foo [string:Error:private] => [code:protected] => 0 [file:protected] => /in/IsrCd [line:protected] => 4 [trace:Error:private] => Array ( ) [previous:Error:private] => ) )

preferences:
16.59 ms | 410 KiB | 5 Q