PHP Classes

File: readme.md

Recommend this page to a friend!
  Classes of Niko Peikrishvili   PHP Console Progress Bar   readme.md   Download  
File: readme.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: PHP Console Progress Bar
Display bars for in-progress console tasks
Author: By
Last change:
Date: 1 year ago
Size: 604 bytes
 

Contents

Class file image Download

Description

This is a simple wrapper around iterable variable with zero dependencies that uses generator to display progress in cli

Installation

composer require nikop/progress

Usage

<?php

use Progress\Progress;

require __DIR__.'/../vendor/autoload.php';


foreach (Progress::wrap(range(1, 4)) as $number) {
    foreach (Progress::wrap(range(1, 5),'Second') as $secondNumber) {
        foreach (Progress::wrap(range(1, 6), 'Third') as $thirdNumber) {
            {
                usleep(20000);
            }
        }
    }
}

Result

![](./examples/demo.gif)