Bug report
When a preg_match group contains ^ or $, the type of the group in the matches result array is inferred as non-falsy-string, indicating that it cannot be string '0'. That is wrong.
Code snippet that reproduces the problem
https://phpstan.org/r/b2ba615b-0e37-45ba-8330-e428144907c1
Expected output
No issues
Did PHPStan help you today? Did it make you happy in any way?
No response