Development Tools

Profiling PHP with XHProf & XHGui

For a well described tutorial on basic PHP profiling and optimization I would recommend the 3 part article written by Davey Shafik: Profiling PHP Part 1: Intro to Xhprof & Xhgui Profiling PHP Part 2: Xhgui In-Depth Profiling PHP Part 3: Practical Performance Tuning

Tips & Tricks

Detecting Firebug

To detect the presence of firebug in a browser window simply check that window.console is not ‘undefined’. You can get the version of firebug by reading the value from console.firebug.