Self-hosted XHProf (free & opensource)

We maintain a fork of the original XHProf extension that provides PHP 7 support and a completely rewritten code-base for less overhead.

You can install tideways_xhprof PHP Extension by compiling it from its open-soruce codes. Head over to the Github repository and download the source from there. You can install the extension using these steps:

git clone "https://github.com/tideways/php-xhprof-extension.git"
cd php-xhprof-extension
phpize
./configure
make
sudo make install

Load the extension in your php.ini with extension=tideways_xhprof.so.

As for integration of Tideways into your application you can use the low-level API to enable and disable the Profiler, much like XHProf worked:

<?php
tideways_xhprof_enable();

// your application code

$data = tideways_xhprof_disable();
file_put_contents(
    sys_get_temp_dir() . "/" . uniqid() . ".yourapp.xhprof",
    serialize($data)
);

This stores the trace in your temporary directory which the default UI uses to look for data. Install the xhprof_lib and xhprof_html directories from this repository into your webfolder and navigate to xhprof_html/index.php to see a list of trace.

If you want to use some improved open-source UIs take a look at the following projects:

Please check each projects installation notes on how to get the respective UIs running.

Try Tideways PHP Profiler 30 days for free

Are you looking for a PHP Profiler with more features and control than XHProf? We have built a new intuitive and modern UI around XHProf and enhanced it with additional monitoring and exception tracking features to create a single, powerful tool for PHP application performance management.

The cloud version of Tideways includes SQL, HTTP, Framework + E-Commerce Profiling and many additional features that XHProf does not.

If you want to avoid the manual setup, integration and maintenance, then give our Tideways Profiler Cloud version a try. We take care of efficient collection, aggregation and provide a snappy, modern UI combined with many additional features such as Alerting on top.

You can try the Tideways Profiler UI 30 days for free, no credit-card required:

Start Free 30 Days Trial