My environments include OS X with Zend Server CE and Ubuntu Server, Apache 2. Developing with Symfony 1.4 & Doctrine on PHP 5.3.
I'm searching for a profiler that can be used with command-line PHP scripts as well as Apache-invoked PHP. At the moment my need for command-line is actually more urgent than the web scripts.
I have already done some brute-force timing via logging microtime() intervals to good effect but I'd like to be able to get total times for each function being called and without so much hand-coding.
While my main concern is time profiling, a memory profiler would also be very useful. Similar to using microtime() I've occasionally had to make repeated calls to memory_get_usage() before and after instantiating large objects or collections to get an idea how big their footprint is.