Skip to content

Variable $var might not be defined #10228

Description

Bug report

Explained in the playground link.

Code snippet that reproduces the problem

https://phpstan.org/r/e8a35da3-39dd-431e-960f-fc7e77dba4f2
https://phpstan.org/r/026707d1-2de9-4bbb-8f1c-d47312de414c

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

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions