Profiling PHP code

I have actually done some optimisation work last week. XDebug is indeed the way to go.

Just enable it as an extension (for some reason it wouldn’t work with ze_extension on my windows machine) , setup your php.ini with xdebug.profiler_enable_trigger=On and call your normal urls with XDEBUG_PROFILE=1 as either a get or a post variable to profile that very request. There’s nothing easier!

Also, i can really reccommend webgrind , a webbased (php) google Summer Of Code project that can read and parse your debug output files!

Leave a Comment