PHP code example of ckoumpis / php-prompt

1. Go to this page and download the library: Download ckoumpis/php-prompt 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/ */

    

ckoumpis / php-prompt example snippets


Console::log("Hello from ckoumpis/php-prompt!");
Console::success("Operation successful!");
Console::error("An error occurred!");
Console::warning("Warning");
Console::blue("This is a blue message");
Console::magenta("This is a magenta message");
Console::cyan("Cyan message for notification");

for($i =1; $i <=$total; $i++) {
    ProgressBar::display($i, $total);
    usleep(10000);
}

ProgressBar::withSteps(1, 10,1);

for($i = 0; $i < 10; $i++) {
    Spinner::spin();
    sleep(1);
}

Spinner::withSteps(0, 10, 1);
bash
composer