PHP code example of guiguiboy / php-cli-progress-bar
1. Go to this page and download the library: Download guiguiboy/php-cli-progress-bar 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/ */
guiguiboy / php-cli-progress-bar example snippets
_once 'ProgressBar/Registry.php';
$progressBar = new \ProgressBar\Manager(0, 10);
for ($i = 0; $i <= 10; $i++)
{
$progressBar->update($i);
sleep(1);
}
foreach ($array as $element)
{
// process element
$progressBar->advance();
}