Skip to content

Oversized array cannot be falsy/truthy #13797

@fsok

Description

@fsok

Bug report

phpstan seems to internally resolve some arrays as the type oversized-array. With this type phpstan seems to not allow falsy/truthy checks.

Code snippet that reproduces the problem

https://phpstan.org/r/e8ff0f7e-8e05-4b86-b054-dc67fbc6f677

Expected output

Error 77 Negated boolean expression is always false. is not expected.

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

Yes, thank you very much for this great tool.

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