PHP code example of mdurrant / php-console-color
1. Go to this page and download the library: Download mdurrant/php-console-color 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/ */
mdurrant / php-console-color example snippets
echo "\033[0;31Foo:\033[0m Bar";
$console->writeLn("<red>Foo:</red> Bar");
$console = new Console();
$console->write('This');
$console->write('is');
$console->write('a');
$console->writeLn('<blue>Test</blue>');
$console->writeLn('Hello world!');