Skip to content

array_column on object arrays #5101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
staabm opened this issue May 31, 2021 · 0 comments
Open

array_column on object arrays #5101

staabm opened this issue May 31, 2021 · 0 comments

Comments

@staabm
Copy link
Contributor

staabm commented May 31, 2021

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

@staabm staabm changed the title array_column on object arrays array_column on object arrays May 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants