-
- Notifications
You must be signed in to change notification settings - Fork 933
Closed
Labels
Description
Bug report
When a wildcard character (.) is included in a regex capture group, the inferred type will be as if the wildcard was not there:
preg_match("((m.x))", ..., $match) // ^ array{string, 'mx'}Code snippet that reproduces the problem
https://phpstan.org/r/ca2201e5-a8d0-410d-894f-c95fa6dcc2fa
Expected output
In this case, the capture group should probably result in a non-falsy-string, like ((m.+x)) would.
Related: #12210