3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { exit(new stdClass); } catch (Throwable $e) { echo $e::class, ': ', $e->getMessage(), PHP_EOL; } echo "Passed the exit()";
Output for 8.4.1 - 8.4.12
TypeError: exit(): Argument #1 ($status) must be of type string|int, stdClass given Passed the exit()
Output for 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.25
Error: Object of class stdClass could not be converted to string Passed the exit()

preferences:
74.08 ms | 407 KiB | 5 Q