Bug report
I just noticed that phpstan/phpstan-src#2589 doesn't seem to play well with strict rules.
This example without strict rules works: https://phpstan.org/r/6187bcca-8fc8-459b-9790-21a82e62b345
But when I enable strict rules, I need to cast the return value of preg_match() to a bool and this seems to block the types from passing through. For example: https://phpstan.org/r/f368fc07-6438-43f1-b80b-93dee22535f4
Same thing happens when I cast to an int: https://phpstan.org/r/0d011355-4446-4bd8-9b8d-0c44907f9a07
Code snippet that reproduces the problem
https://phpstan.org/r/f368fc07-6438-43f1-b80b-93dee22535f4
Expected output
No issue should have been detected
Did PHPStan help you today? Did it make you happy in any way?
No response