How to allow stdClass
into foreach
?
#10964
-
PHPStan errors with the below, despite the fact the code is fine and runs https://3v4l.org/epPWK, how do I get around these warnings? |
Beta Was this translation helpful? Give feedback.
Answered by
ondrejmirtes
May 3, 2024
Replies: 1 comment 1 reply
-
Objects passed to foreach behave very unpredictably in PHP. Try this instead: https://phpstan.org/r/f0d04b52-1200-4140-94f7-0b310074ef27 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
TomHart
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Objects passed to foreach behave very unpredictably in PHP. Try this instead: https://phpstan.org/r/f0d04b52-1200-4140-94f7-0b310074ef27