Skip to content

Regression in 2.2.15 with null coalescing operator and regex matches #15297

Closed

Description

@miken32

Bug report

phpstan is now complaining about my use of null coalescing operators with regex matches, after an update from 2.2.14 to 2.2.15. This worked previously. Sorry, I don't have 21 LLM-generated paragraphs to describe things in excruciating detail.

Online testing only shows the failure with older versions of PHP, but I am testing on 8.5 and getting failures.

Code snippet that reproduces the problem

https://phpstan.org/r/3674fd77-2d5a-46d4-9064-e415900f8bc6

Expected output

No errors?

Did PHPStan help you today? Did it make you happy in any way?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions