Search code examples
apache2phpprofilingxhprof

Embedded profiler for PHP


I want to profile some PHP code, function by function, so I need a profiler that can check block of code. I found XHProf, and I was able to install it on MAMP following the guide Profiling with XHProf.

The problem is that I am working on a test server remotely, which I don't have the rights to, and I don't really want to tweak...

Is there a code solution for profiling?

Must I put my hands on the server's configurations?


Solution

  • Try using the Xdebug profiler with KCacheGrind. Have a look at the blog post Profiling a PHP Application.