Progress bars are not so hard. Inspired from http://forums.devshed.com/php-development-5/php-cli-progress-indicator-151590.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $max = 100; | |
| for ($current = 1; $current <= $max; $current++) { | |
| $progress = "\r[%-{$max}s](%s/%s)"; | |
| echo sprintf($progress, str_repeat("=", $current). '>', $current, $max); | |
| // replace echo with stdio of Aura, so we can make awesome colors also ;) | |
| usleep(6000); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://showterm.io/1312935e77e2ac9f74047