PHP code example of diversen / php-cli-spinners

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

    

diversen / php-cli-spinners example snippets




iversen\Spinner;

$spinner = new Spinner(spinner: 'simpleDots', message: "Loading");
$res = $spinner->callback(function () {
    sleep(2);
    return 42;
});

echo "$res\n"; // 42



bash
composer