Bug report
When nesting capturing subpatterns that have both empty and non-empty branches, phpstan assumes the resulting type is non-falsy-string, instead of string.
Code snippet that reproduces the problem
https://phpstan.org/r/8c787e73-b367-4dfb-9a6f-0c5eacae72a2
Expected output
"No errors!"
Did PHPStan help you today? Did it make you happy in any way?
No response
Bug report
When nesting capturing subpatterns that have both empty and non-empty branches, phpstan assumes the resulting type is non-falsy-string, instead of string.
Code snippet that reproduces the problem
https://phpstan.org/r/8c787e73-b367-4dfb-9a6f-0c5eacae72a2
Expected output
"No errors!"
Did PHPStan help you today? Did it make you happy in any way?
No response