Presumably you're running it on a webserver, do you have shell access aswell? If so, you could run 'top' while executing the PHP script to monitor resource changes.
Calculating PHP script resource usage - by Mike on 05-16-2009 at 04:27 PM RE: Calculating PHP script resource usage - by Dr4g0n on 05-16-2009 at 08:35 PM