divineomega / php-cli-progress-bar
This package is abandoned and no longer maintained.
The author suggests using the jord-jd/php-cli-progress-bar package instead.
Progress bar for command line PHP scripts
Fund package maintenance!
v4.1.0
2026-07-18 00:43 UTC
Requires
- php: >=5.6
- khill/php-duration: ^1.0
Requires (Dev)
- phpunit/phpunit: ^5.7||^9.6
Replaces
- divineomega/php-cli-progress-bar: v4.1.0
This package is auto-updated.
Last update: 2026-07-18 00:46:18 UTC
README
Progress bar for command line PHP scripts.
Installation
To install, just run the following Composer command.
composer require jord-jd/php-cli-progress-bar
Usage
The following code snippet shows a basic usage example.
$max = 250; $progressBar = new JordJD\CliProgressBar\ProgressBar; $progressBar->setMaxProgress($max); for ($i=0; $i < $max; $i++) { usleep(200000); // Instead of usleep, process a part of your long running task here. $progressBar->advance()->display(); } $progressBar->complete();
Calling setMaxProgress() before the first advancement starts the elapsed-time and ETC measurements. If you prepare a progress bar early, call $progressBar->start() immediately before processing to reset those measurements explicitly.
