Skip to content

Regex matches should have array shape if the regex is known #9502

@mvorisek

Description

@mvorisek

Feature request

If the regex is known/constant a very little trick is needed to obtain the returned array keys/shape: https://3v4l.org/sOXbn

Regexes are everywhere and thus the result shape would improve phpstan checks a lot.

https://phpstan.org/r/71ffe793-4349-4555-8385-a233d152178d

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions