3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function (int $code, string $message, string $file, int $line) : never { throw new ErrorException($message, $code, E_NOTICE, $file, $line); }, ~0); try { include __DIR__; } catch (Throwable $thrown) { var_dump((string) $thrown); } ?>
Output for 8.4.1 - 8.4.8
string(205) "ErrorException: include(/in): Failed to open stream: Success in /in/B8DQp:6 Stack trace: #0 /in/B8DQp(6): {closure:/in/B8DQp:2}(2, 'include(/in): F...', '/in/B8DQp', 6) #1 /in/B8DQp(6): include() #2 {main}"
Output for 8.2.0 - 8.2.28, 8.3.0 - 8.3.22
string(193) "ErrorException: include(/in): Failed to open stream: Success in /in/B8DQp:6 Stack trace: #0 /in/B8DQp(6): {closure}(2, 'include(/in): F...', '/in/B8DQp', 6) #1 /in/B8DQp(6): include() #2 {main}"

preferences:
46.29 ms | 408 KiB | 5 Q