Bug report
The regex analyzer wrongly sees an optional capture group as always matching when it is followed by a required capture group
Code snippet that reproduces the problem
https://phpstan.org/r/8672bf06-a297-4186-bd3e-b0b21f3959e2
Expected output
I expect the resulting type to be array<int, array{string, ''|'ERR', non-empty-string}>
as the first capturing group is optional. See https://3v4l.org/iaF0d for runtime results
Did PHPStan help you today? Did it make you happy in any way?
No response