Firebug is the most popular tool for analyzing HTML, CSS & JavaScript based webpages. Now, there is PHP Quick Profiler (PQP), which can be called as Firebug for PHP.
It is specially focused on analyzing the performance of PHP codes. With a beautiful interface, PQP can:
  • log memory usage
  • display the number & sizes of included files
  • show page execution times
  • log database queries

PHP Quick Profiler is not a plug & play solution as every project may have a totally different structure. But, by following the setup information & the example provided, it is easy to integrate.
To see how functional it is, you can check the demo.