Skip to content

False positive same comparison #7248

@simPod

Description

@simPod

Bug report

When comparing array with two optional keys with another array that has the one of two keys, phpstan thinks the comparison is useless.

Code snippet that reproduces the problem

https://phpstan.org/r/8e738d75-5a9f-48ca-b3f4-97669c6fb065

Expected output

No errors.

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