Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > f5bdfacbd5622c4b9d663f8854d91333 > files > 3

php-pear-Console_ProgressBar-0.5.2beta-6.mga4.noarch.rpm

<?php
require_once 'Console/ProgressBar.php';

print "A more complicated bar, showing current status in numbers as well:\n";
$bar = new Console_ProgressBar('%bar%', '=', ' ', 76, 3);
// let's assume we have a bar object we want to reuse
$bar->reset('* %fraction% [%bar%] %percent%', '=>', '-', 76, 7);
for ($i = 0; $i <= 7; $i++) {
    $bar->update($i);
    sleep(1);
}
print "\n";