mdurrant / php-console-color
Extremely simple library for writing to the console in color
Installs: 1 579
Dependents: 1
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: >=5.4
This package is auto-updated.
Last update: 2024-11-05 08:23:14 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
####Colors
####License MIT