Bug report
Having an exit or return and then functions below that will trigger unreachable statement error in phpstan. In PHP however that is valid code, and you can define functions at the end of the file and call them earlier.
To clarify, without exit, phpstan is able to detect that the function exists.
Code snippet that reproduces the problem
https://phpstan.org/r/37860c0a-c071-41d7-9bf3-99cd0ac7ef27
Expected output
No error