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!
DivineOmega

Installs: 147 958

Dependents: 1

Suggesters: 0

Security: 0

Stars: 15

Watchers: 0

Forks: 0

Open Issues: 1

pkg:composer/divineomega/php-cli-progress-bar

v4.0.0 2026-02-14 21:40 UTC

This package is auto-updated.

Last update: 2026-02-15 03:26:01 UTC


README

Progress bar for command line PHP scripts.

Example of PHP CLI Progress Bar

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();