Skip to content

array_keys doesn't always return all keys #3300

@rjensen

Description

@rjensen

Bug report

According to the documentation of array_keys, if you specify the second parameter search_value only the keys matching that value are returned. PHPstan seems to believe that it always returns all keys.

Code snippet that reproduces the problem

https://phpstan.org/r/80db9c3d-6084-4a41-80ce-e4a6faebc24e

Expected output

No errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions