PHP code example of sbolch / console-helper

1. Go to this page and download the library: Download sbolch/console-helper library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sbolch / console-helper example snippets


use sbolch\ConsoleHelper;

echo ConsoleHelper::success("Task completed.\n");
echo ConsoleHelper::error("Failure!\n");
echo ConsoleHelper::warning("Attention!\n");
echo ConsoleHelper::info('5 items updated.');
echo ConsoleHelper::replace(ConsoleHelper::info('6 items updated.'));
echo "\n";
echo ConsoleHelper::replaceLine('All previous lines are replaced with this.', 4);
echo ConsoleHelper::progress(
    50, // percentage
    10  // width in characters, default is 20
); // prints this: █████░░░░░