Skip to content

When analyzing usage of array_filter, ARRAY_FILTER_USE_KEY is not taken into account #3132

@morozov

Description

@morozov

Bug report

It looks like PHPStan thinks we're filtering by array values of type object while the filtering is done by its keys of type string.

Code snippet that reproduces the problem

https://phpstan.org/r/70f7e6ab-e67c-4ab3-96ee-fcdeb532df52

Expected output

No error reported.

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