Skip to content

How to allow stdClass into foreach? #10964

Closed Answered by ondrejmirtes
TomHart asked this question in Support
Discussion options

You must be logged in to vote

Objects passed to foreach behave very unpredictably in PHP. Try this instead: https://phpstan.org/r/f0d04b52-1200-4140-94f7-0b310074ef27

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@TomHart
Comment options

Answer selected by TomHart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Support
Labels
None yet
2 participants