Skip to content

Instantly share code, notes, and snippets.

View Clicketyclick's full-sized avatar

Erik Bachmann Clicketyclick

View GitHub Profile
@Clicketyclick
Clicketyclick / progress_bar.php
Last active February 28, 2024 02:44 — forked from mayconbordin/progress_bar.php
PHP CLI progress bar in 5 lines of code
<?php
/**
* @brief Return a progress bar with the length of $width
*
* @param [in] $done count for progress
* @param [in] $total Maximum of progress
* @param [in] $info Prefix text
* @param [in] $width Width of progress bar (w/o prefix)
* @param [in] $off Char to indicate not processed yet
* @param [in] $on Char to indecate process