Skip to content

array is non-empty when array_is_list returns false #9734

@villfa

Description

@villfa

Feature request

array_is_list() returns true when it is called with an empty array: https://3v4l.org/fCJQ8#v8.2.9

That means an array is not empty when this function returns false.

/** @var array<mixed> $a */
assert(!array_is_list($a));

\PHPStan\dumpType($a); // could be non-empty-array

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

Yes, PHPStan is great. Let's make it even better!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions