Bug report
Starting in PHPStan 2.1.30, there is a "Variable might not be defined" error when using array_key_exists in a loop, followed by an isset check for an offset of the array. But the variable is always defined, and there was no error in PHPStan 2.1.29.
Code snippet that reproduces the problem
https://phpstan.org/r/9036d9ce-df31-42d1-81d3-c1deadf4c3d7
Expected output
No error
Did PHPStan help you today? Did it make you happy in any way?
No response