Bug report
a variable assigned from array_search or array_find_key should infer the proper $array[$key] type when compared later on, similar to how its done in phpstan/phpstan-src#5537
Code snippet that reproduces the problem
https://phpstan.org/r/e9efce03-3662-41f7-bfa7-449aa480f9ba
Expected output
no error
Did PHPStan help you today? Did it make you happy in any way?
No response
Bug report
a variable assigned from
array_searchorarray_find_keyshould infer the proper$array[$key]type when compared later on, similar to how its done in phpstan/phpstan-src#5537Code snippet that reproduces the problem
https://phpstan.org/r/e9efce03-3662-41f7-bfa7-449aa480f9ba
Expected output
no error
Did PHPStan help you today? Did it make you happy in any way?
No response