20%ルールの話 で紹介されているGoogleプログレスバーをPHPで作ってみました。 <?php require_once 'Console/ProgressBar.php'; $bar = new Console_ProgressBar('[G%bar%] %percent%', 'oogle', '-', 80, 7); for ($i = 0; $i <= 7; $i++) { $bar->update($i); sleep(1); } echo "\n"; ?> これだけ。 実行するとこんな感じになります。 にょいーん [Gooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooogle] 100.00% HTTP_Request_Listenerに載ってるサンプルコード書き換えれば Googleプログレスバ