PHP code example of robotdance / php-console

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

    

robotdance / php-console example snippets


use robotdance/Sprite;
...
$spr = new Sprite('./sprites/blinking_programmer.spr');
echo $spr->animate();
}

use robotdance/Console;
...
echo Console::red('Bob is going home'); // red text
echo Console::apply('Bob is going home', ['red', 'bold']); // red and bold text
echo Console::indent('Bob is going home', 4, 2); two levels of identation
}