php cli progress bar
v2.1.0
شريط التقدم لخط الأوامر البرامج النصية PHP.

للتثبيت ، فقط قم بتشغيل أمر الملحن التالي.
composer require divineomega/php-cli-progress-bar
يعرض مقتطف الكود التالي مثال الاستخدام الأساسي.
$ max = 250 ;
$ progressBar = new DivineOmega CliProgressBar ProgressBar ;
$ progressBar -> setMaxProgress ( $ max );
for ( $ i = 0 ; $ i < $ max ; $ i ++) {
usleep ( 200000 ); // Instead of usleep, process a part of your long running task here.
$ progressBar -> advance ()-> display ();
}
$ progressBar -> complete ();