Skip to content

objects does not have to be Traversable to be ForEach'ed. #4535

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
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

divinity76
Copy link
Contributor

fix #4534

@@ -5,7 +5,7 @@
<?phpdoc print-version-for="foreach"?>
<para>
The <literal>foreach</literal> construct provides an easy way to
iterate over <type>array</type>s and <interfacename>Traversable</interfacename> objects.
iterate over <type>array</type>s and objects.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should specify that it's only object properties that can be iterated over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ForEach does not issue an error for non-iterable non-Traversable objects
3 participants