PHP code example of alecrabbit / php-cli-snake
1. Go to this page and download the library: Download alecrabbit/php-cli-snake 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/ */
alecrabbit / php-cli-snake example snippets
use AlecRabbit\Snake\Spinner;
use React\EventLoop\Factory;
$s = new Spinner();
$loop = Factory::create();
$loop->addPeriodicTimer($s->interval(), static function () use ($s) {
$s->spin();
});
$s->begin();
$loop->run();
$s->end();
bash
$ composer