From 15f11b00751d9e54ec9e933e6cb054882e6baa45 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Thu, 14 Apr 2005 07:49:42 +0000 Subject: [PATCH] foreach with referenced arrays (bug #29686) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@184323 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/control-structures.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/language/control-structures.xml b/language/control-structures.xml index eca7d85eae..514b0bc0e0 100644 --- a/language/control-structures.xml +++ b/language/control-structures.xml @@ -1,5 +1,5 @@ - + Control Structures @@ -532,7 +532,8 @@ foreach (array_expression as $key => $value) - Also note that foreach operates on a copy of + Unless the array is referenced, + foreach operates on a copy of the specified array and not the array itself. Therefore, the array pointer is not modified as with the each construct, and changes to the array