note 53047 deleted from control-structures.foreach by googleguy
| From: | googleguy@php.net | Date: | Wed, 14 Nov 2012 22:34:19 +0000 |
| Subject: | note 53047 deleted from control-structures.foreach by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-191984@lists.php.net to get a copy of this message | ||
Note Submitter: flobee at gmail dot com
----
be aware! take the note in the manual serious: "foreach operates on a copy of the specified
array"
when working with complex systems you may get memory problems because of all this copies of arrays.
i love this function (easy to use) and use it more often than "for" or "while"
functions but now i have really problems on this and finally found the reason (which can be a mess
to find out)!
the sum of memory usage sometimes can be *2 than you really need.