• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

PHP CLI Question and Memory Usage


Well-known member
I have PHP script that I run through CLI and it is using A LOT of memory. (but it is doing a ton of work)

What techniques should I use to free up memory during the CLI processing?


Well-known member
I'm generally scared of things like this:

foreach ($array as $key => $data){
     $query = "UPDATE ...";
Have you profiled your script?