server 52763dedf1 gitignore | 2 年之前 | |
---|---|---|
.. | ||
src | 2 年之前 | |
CHANGELOG.md | 2 年之前 | |
LICENSE | 2 年之前 | |
README.md | 2 年之前 | |
composer.json | 2 年之前 |
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);