Skip to content

Offset might not exist regression from phpstan 2.1.23 #13688

@mind-bending-forks

Description

@mind-bending-forks

Bug report

The code snippet below appears to start producing an incorrect error from phpstan 2.1.23.

(Additionally, if 'Treat PHPDoc types as certain' is enabled, an additional error is reported, yet the snippet does not include any PHPDoc comments, which is perhaps unexpected.)

Code snippet that reproduces the problem

https://phpstan.org/r/0d3c60e4-3978-4c72-9eb1-9adfc56425b8

Expected output

No errors.

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

Yes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions