3v4l.org

run code in 500+ 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.28, 8.5.0 - 8.5.13, 8.6.0
TypeError: exit(): Argument #1 ($status) must be of type string|int, stdClass given Passed the exit()
Output for 8.1.0 - 8.1.34, 8.2.0 - 8.2.36, 8.3.0 - 8.3.37
Error: Object of class stdClass could not be converted to string Passed the exit()

preferences:
15.6 ms | 1167 KiB | 6 Q