PHP code example of tonybogdanov / xhprof

1. Go to this page and download the library: Download tonybogdanov/xhprof library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

tonybogdanov / xhprof example snippets


\Profiler\Profiler::registerPublicPath( 'public/xhprof', 'http://localhost/xhprof' );
\Profiler\Profiler::start();

// Code being profiled.

\Profiler\Profiler::stop();
exit;
bash
echo "extension=tideways_xhprof.so" >> php.ini
service apache2 restart