PHP CLI Question and Memory Usage

robdog

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?
 
I'm generally scared of things like this:

PHP:
foreach ($array as $key => $data){
     $query = "UPDATE ...";
     $db->query($query);
}

Have you profiled your script?
 
Back
Top Bottom