Bug report
In certain circumstances, logic used to narrow down types is not correctly understood by phpstan.
Code snippet that reproduces the problem
https://phpstan.org/r/68974319-0f1f-4b77-9561-86f5da7cbc54
Expected output
- phpstan should understand that
$result2['a'] is numeric and so can be cast to float.
- no errors reported by phpstan
Did PHPStan help you today? Did it make you happy in any way?
Yes