-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
phpstan/phpstan-src
#3866Labels
Description
Bug report
I have an array of arrays and looping over it.
I am then extracting the first array key with array_key_first.
After that I am checking the key.
In some cases I will do a continue inside the loop.
But if all is fine, I try to get the value of the array with the given key.
But here phpstan tells me that the offset does not exist.
Code snippet that reproduces the problem
https://phpstan.org/r/7bcc093c-65e8-4e01-aa35-7345c6cf7a0f
Expected output
I would expect, that all keys I am using to access the array are correct.
Did PHPStan help you today? Did it make you happy in any way?
I really love PHPStan and have much fun optimizing my code. :)
Reactions are currently unavailable