PHP code example of troublete / crayon
1. Go to this page and download the library: Download troublete/crayon 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/ */
troublete / crayon example snippets
function Crayon\{text as crayon, error, success};
echo crayon('text')->green(); // returns green text
echo crayon('text')->green()->bold(); // returns bold green text
echo crayon('text')->green()->underline()->bold(); // returns underlined bold green text
echo crayon('text')->green()->underline()->bold()->background(); // returns underlined bold green backgrounded text
echo success('text'); // returns green bold text with checkmark at the end
echo error('text'); // returns red bold text with x at the end