Skip to content

array_column on object arrays #5101

@staabm

Description

@staabm

Bug report

php supports calling array_column on an array of objects:

https://3v4l.org/9FktK

therefore I would expect phpstan to error on array_column calls which use a unknown property name

Code snippet that reproduces the problem

https://phpstan.org/r/3f36a4d6-8036-4db0-9d6b-aedee7ff527d

Expected output

error on the array-column line, because of undefined property

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