I currently have a PHP CLI script using Zend Framework extensively which seems to be using a ever larger amount of memory as it runs. It loops through a large set of models
Here is a code snippet I found at weberdev
It gets the size of the given array in bytes. Is this what you meant?