note 9694 deleted from language.types.array by jimw
| From: | jimw@php.net | Date: | Fri, 14 Dec 2001 19:53:39 +0000 |
| Subject: | note 9694 deleted from language.types.array by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-22671@lists.php.net to get a copy of this message | ||
[Editor's Note: PHP almost always passes arguments by value and not by reference. current() is
doing exactly what it seems to be doing - returning a copy of the value stored in the array
element.]
When looping through the contents of an array, current() actually seems to return a "copy"
of each element in that array. Therefore, any changes you make to the value returned by current
won't affect the value referenced by the array item.