NYCPHP Meetup

[nycphp-talk] PHP Scope in foreach construct.

Anthony Wlodarski anthony at thrillist.com
Mon Jan 26 12:27:43 EST 2009


When working with foreach constructs do the functions and variables defined get returned to the garbage collector on each iteration or does the foreach have to finish execution before things can be returned to the garbage collector?

The reason that I ask is because we are generating data for Google Maps and they require one very large XML file which keeps blowing our memory size definition inside the php.ini file.  What we might end up doing is creating the XML file in batches of lets say 500 items or less and then append the files manually.

I figured this was an interesting question and I can't find any answers anywhere else (even on php.net docs).

-Anthony
--
Anthony Wlodarski
www.thrillist.com <http://www.thrillist.com>
Web Applications Developer
568 Broadway Ste. 605
New York, NY, 10012
(o) 646.786.1944
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20090126/28fc01c3/attachment.html>


More information about the talk mailing list