Determining the performance consequences of PHP code
Use the Xdebug extension to profile PHP code.
If you're not familiar with valgrind or similar, then to add to @Jordi Bunster's answer...
When you've had profiling on in Xdebug, you can open the dumped profile files in KCacheGrind or WinCacheGrind to get a graphical view of what is taking the time in your code.
Fortunately the xdebug documentation also explains this in detail as well as how to interpret the results: http://xdebug.org/docs/profiler