PHP code example of wol-soft / php-performance-timer

1. Go to this page and download the library: Download wol-soft/php-performance-timer 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/ */

    

wol-soft / php-performance-timer example snippets


Timer::start('my-timer');

Timer::end('my-timer');

Timer::initSettings(['profileNamespace' => 'component.booking']);

...

Timer::start('login', 'component.user');
...
Timer::end('login', 'component.user');

...

Timer::start('check-basket', 'component.booking.init');
...
Timer::end('check-basket', 'component.booking.init');

Timer::initSettings(['throwExceptions' => false]);

Timer::addTimerPlugin($callbackStart, $callbackEnd);

$ composer