Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion language/control-structures/foreach.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<literal>foreach</literal> will issue an error when used with
a variable containing a different data type or with an uninitialized variable.
<informalexample>
Expand Down