mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Documentation Bug #8353
"Documentation claims only a copy of the original array is worked on with foreach(), yet internal pointer *IS* advanced." git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@106292 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
8779fa151a
commit
94ea0839d2
1 changed files with 6 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.65 $ -->
|
||||
<!-- $Revision: 1.66 $ -->
|
||||
<chapter id="control-structures">
|
||||
<title>Control Structures</title>
|
||||
|
||||
|
@ -517,7 +517,11 @@ foreach(array_expression as $key => $value) statement
|
|||
the specified array, not the array itself, therefore the array
|
||||
pointer is not modified as with the <function>each</function>
|
||||
construct and changes to the array element returned are not
|
||||
reflected in the original array.
|
||||
reflected in the original array. However, the internal pointer
|
||||
of the original array <emphasis>is</emphasis> advanced with
|
||||
the processing of the array. Assuming the foreach loop runs
|
||||
to completion, the array's internal pointer will be at the
|
||||
end of the array.
|
||||
</para>
|
||||
</note>
|
||||
</para>
|
||||
|
|
Loading…
Reference in a new issue