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.33, 8.0.1 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
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:
138.58 ms | 403 KiB | 121 Q