Skip to content

Offset ... on array... on left side of ?? always exists and is not nullable bug ? #12078

@ChipsVII

Description

@ChipsVII

Bug report

PHPStan thinks an entry in my associative array always exists, while it is not.

Code snippet that reproduces the problem

https://phpstan.org/r/987df900-0b3b-471d-abcb-4a7837f1cbca

Expected output

It shouldn't complain about my ?? null in the last loop (unless I'm missing something, which is always a possibility)

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

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions