PHP code example of phpexperts / console-painter
1. Go to this page and download the library: Download phpexperts/console-painter 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/ */
phpexperts / console-painter example snippets
use PHPExperts\ConsolePainter\ConsolePainter;
$p = new ConsolePainter();
// This is *REALLY* emphasized!
echo "\t" . $p->italics('This is ') .
$p->bold('*') . $p->bold()->underlined()->yellow('*REALLY*') .
$p->bold()->onLightBlue(' emphasized*') . '!' . "\n";
echo $p->yellow('Press ')->bolder()->red('ENTER')->yellow(' to continue...') . "\n";
echo "\n";
// Draw the Red, White and Blue:
echo $p->bolder()->red('Red')->dim(', ')->italics()->white('White ')->dim('and ')->blue('Blue') . "\n";