svn: /phpdoc/en/trunk/language/control-structures/ foreach.xml
| From: | Adam Harvey | Date: | Sun, 09 Aug 2015 01:14:48 +0000 |
| Subject: | svn: /phpdoc/en/trunk/language/control-structures/ foreach.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-13523@lists.php.net to get a copy of this message | ||
aharvey Sun, 09 Aug 2015 01:14:48 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=337339
Log:
Update foreach() page for PHP 7.
Changed paths:
U phpdoc/en/trunk/language/control-structures/foreach.xml
Modified: phpdoc/en/trunk/language/control-structures/foreach.xml
===================================================================
--- phpdoc/en/trunk/language/control-structures/foreach.xml 2015-08-09 01:14:44 UTC (rev 337338)
+++ phpdoc/en/trunk/language/control-structures/foreach.xml 2015-08-09 01:14:48 UTC (rev 337339)
@@ -39,16 +39,19 @@
<para>
<note>
<para>
- When <literal>foreach</literal> first starts executing, the
- internal array pointer is automatically reset to the first element
- of the array. This means that you do not need to call
- <function>reset</function> before a <literal>foreach</literal>
- loop.
+ In PHP 5, when <literal>foreach</literal> first starts executing, the
+ internal array pointer is automatically reset to the first element of the
+ array. This means that you do not need to call <function>reset</function>
+ before a <literal>foreach</literal> loop.
</para>
<para>
- As <literal>foreach</literal> relies on the internal array pointer, changing it
- within the loop may lead to unexpected behavior.
+ As <literal>foreach</literal> relies on the internal array pointer in PHP
+ 5, changing it within the loop may lead to unexpected behavior.
</para>
+ <para>
+ In PHP 7, <literal>foreach</literal> does not use the internal array
+ pointer.
+ </para>
</note>
</para>
<para>