3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo(exception $e) { throw $e; } function bar(){ return new Exception("here"); } foo(bar());
Output for 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.26, 8.0.0 - 8.0.13, 8.1rc1 - rc3
Fatal error: Uncaught Exception: here in /in/aC1jB:9 Stack trace: #0 /in/aC1jB(12): bar() #1 {main} thrown in /in/aC1jB on line 9
Process exited with code 255.

preferences:
36.38 ms | 460 KiB | 5 Q