PHP code example of baagee / colorful-echo
1. Go to this page and download the library: Download baagee/colorful-echo 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/ */
baagee / colorful-echo example snippets
$colorful = new \BaAGee\Command\ColorfulEcho();
$colorful->setBackgroundColor(\BaAGee\Command\Color::BLUE)->show('hello world!');
echo PHP_EOL;
$colorful->reset()->setStyle(\BaAGee\Command\Style::BOLD)->show('sdgsdf');
echo PHP_EOL;
$colorful->reset()->setFontColor(\BaAGee\Command\Color::GREEN)->show('sdgsd');
echo PHP_EOL;
$colorful->setBackgroundColor(\BaAGee\Command\Color::WHITE)->show('dddd');
echo PHP_EOL;
$colorful->reset()->setBackgroundColor(\BaAGee\Command\Color::GREEN)->setStyle(\BaAGee\Command\Style::BOLD)->setFontColor(\BaAGee\Command\Color::RED)->show('dddd');
echo PHP_EOL;