1. Go to this page and download the library: Download demi/php-timelog 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/ */
demi / php-timelog example snippets
$bigData = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
$allCount = count($bigData);
$timer = new \demi\timelog\TimeLog($allCount);
$timer->showStart();
foreach ($bigData as $item) {
// some handling start...
sleep(rand(1, 2));
// some handling finish...
$timer->handled++;
$timer->showStatus(3); // 3 - how often show status message
}
$timer->showFinish();