For debugging, profiling and optimizing Xdebug is highly recommend: http://xdebug.org/
I noticed there is some discontent with my use of the microtime() method. It's not intended to replace a serious debugger/profiler, but it is something that's available in any PHP environment for quick performance checks.