1. Go to this page and download the library: Download yiisoft/profiler 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/ */
use Psr\Log\NullLogger;
use Yiisoft\Profiler\Profiler;
use Yiisoft\Profiler\Target\LogTarget;
$logger = new NullLogger();
$target = new LogTarget($logger);
$profiler = new Profiler($logger, [$target]);
$profiler->begin('test');
//...some code
$profiler->end('test');