mdurrant/php-console-color

Extremely simple library for writing to the console in color

1.0.1 2015-03-18 07:58 UTC

This package is auto-updated.

Last update: 2024-12-05 08:28:28 UTC


README

####Purpose This lightweight library only serves to make formatted console output code more readable.

Instead of:

echo "\033[0;31Foo:\033[0m Bar";

We can do:

$console->writeLn("<red>Foo:</red> Bar");

####Usage

$console = new Console();
$console->write('This');
$console->write('is');
$console->write('a');
$console->writeLn('<blue>Test</blue>');
$console->writeLn('Hello world!');

will output

Example output

####Colors

####License MIT