PHP code example of dotdecay / time-benchy

1. Go to this page and download the library: Download dotdecay/time-benchy 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/ */

    

dotdecay / time-benchy example snippets


$timeBenchy = new TimeBenchy();
$timeBenchy->mark('Start');
// [... some code here ...]
$timeBenchy->mark('After function X');
// [... some code here ...]
$timeBenchy->mark('After Database call');
// [... some code here ...]
$timeBenchy->mark('End');
$timeBenchy->printStats();