Skip to content

[Sync-En] objects does not have to be Traversable to be ForEach'ed. (#4535) - #1231

Merged
julionc merged 1 commit into
php:masterfrom
lacatoire:sync-en/1217-foreach-objects-traversable
Sep 2, 2026
Merged

[Sync-En] objects does not have to be Traversable to be ForEach'ed. (#4535)#1231
julionc merged 1 commit into
php:masterfrom
lacatoire:sync-en/1217-foreach-objects-traversable

Conversation

@lacatoire

Copy link
Copy Markdown
Member

Fixes #1217

Sync with EN commit 0d9947f2b1f0997cd8ddf80227b632dd5d3f2f92.

  • Remove the incorrect claim that foreach only works on Traversable objects
  • Change "iterable" to "value" since the operand is not necessarily the iterable type
  • Add a sentence explaining that objects are traversed over their visible properties by default

@julionc
julionc merged commit 085c096 into php:master Sep 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Sync EN] objects does not have to be Traversable to be ForEach'ed. (#4535)

2 participants