Tips & Tricks

Progress bar

Show a status bar in the console

Based on @@stackoverflow_icon@@

for($x=1;$x<=100;$x++){
    show_status($x, 100);
    usleep(100000);
 }

Will produce a bar like:

[===>                           ]  10% 🕐  10/100        elap.⧔:  0 sec. remain.⧕:  0 sec. eta.𝜂  0

Building up till:

[===============================] 100% 🕛 100/100        elap.⧔:  0 sec. remain.⧕:  0 sec. eta.𝜂  0

Files