Bug report
PHPStan detects rightfully that an array is non empty whether calling in_array() with it returns true, but only when in_array() is strict.
I think this behaviour should not depend on the strictness of in_array().
Code snippet that reproduces the problem
https://phpstan.org/r/2281baba-6802-4195-af8a-b94dd641cfb6
Expected output
Dumped type should be non-empty-array in both cases.
Did PHPStan help you today? Did it make you happy in any way?
PHPStan is such a great tool. Thank you for your work!
Bug report
PHPStan detects rightfully that an array is non empty whether calling
in_array()with it returns true, but only whenin_array()is strict.I think this behaviour should not depend on the strictness of
in_array().Code snippet that reproduces the problem
https://phpstan.org/r/2281baba-6802-4195-af8a-b94dd641cfb6
Expected output
Dumped type should be
non-empty-arrayin both cases.Did PHPStan help you today? Did it make you happy in any way?
PHPStan is such a great tool. Thank you for your work!