- 
        Couldn't load subscription status. 
- Fork 48
process output
        Inhere edited this page Jan 10, 2019 
        ·
        1 revision
      
    使用 Show::dynamicTxt()/$output->dynamicTxt()

使用 Show::progressTxt()/$output->progressTxt()

使用 Show::progressBar()/$output->progressBar()
public static function progressBar(int $total, array $opts = [])示例代码:
$total = 120;
$bar = Show::progressBar($total, [
    'msg' => 'Msg Text',
    'doneChar' => '#'//  ♥ ■ ☺ ☻ = # Windows 环境下不要使用特殊字符,否则会乱码
]);
echo "Progress:\n";
$i = 0;
while ($i <= $total) {
     $bar->send(1);// 发送步进长度,通常是 1
     usleep(50000);
     $i++;
}
我的其他PHP项目
- inhere/kite 方便本地开发和使用的个人CLI工具应用
- php-toolkit/pflag PHP编写的,通用的命令行标志(选项和参数)解析库
- phppkg/easytpl 使用简单且快速的 PHP 模板引擎
- inhere/php-validate 一个简洁小巧且功能完善的php验证库
- inhere/sroute 轻量且快速的HTTP请求路由库