|
|
3 vuotta sitten | |
|---|---|---|
| .. | ||
| src | 3 vuotta sitten | |
| CHANGELOG.md | 3 vuotta sitten | |
| LICENSE | 3 vuotta sitten | |
| README.md | 3 vuotta sitten | |
| composer.json | 3 vuotta sitten | |
Highlight PHP code in console (terminal).
Just run the following command to install it:
composer require --dev php-parallel-lint/php-console-highlighter:"0.*"
<?php
use JakubOnderka\PhpConsoleColor\ConsoleColor;
use JakubOnderka\PhpConsoleHighlighter\Highlighter;
require __DIR__ . '/vendor/autoload.php';
$highlighter = new Highlighter(new ConsoleColor());
$fileContent = file_get_contents(__FILE__);
echo $highlighter->getWholeFile($fileContent);