From 94ea0839d2db2c87085d6eec452de5c2e6fc6b39 Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Sat, 30 Nov 2002 16:42:10 +0000 Subject: [PATCH] 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 --- language/control-structures.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/language/control-structures.xml b/language/control-structures.xml index 0708e3f1d2..78a64ff917 100644 --- a/language/control-structures.xml +++ b/language/control-structures.xml @@ -1,5 +1,5 @@ - + Control Structures @@ -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 each 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 is 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.