Skip to content

Array destructuring: Variable always exists and is not falsy. #7724

@JoniJnm

Description

@JoniJnm

Bug report

phpstan asummes destructuring array as not empty

Code snippet that reproduces the problem

https://phpstan.org/r/645cd80c-ea2b-41f2-9399-11bae7aca398

Expected output

No errors

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