普通进度条

$count = 100;
for ($i = 1; $i <= 100; $i++) {
    usleep(50000);
    printf("\r [%-100s] (%2d%%/%2d%%)", str_repeat("=", $i) . ">", ($i / $count) * 100, $count);
}

进度条1.gif

高逼格的进度条

for ($i = 1; $i <= 100; $i++) {
    usleep(50000);
    printf("\033 [31m\r [%-100s]\033 [0m (%2d%%/%2d%%)", str_repeat("=", $i) . ">", ($i / $count) * 100, $count);
}

进度条2.gif