Mercurial > hg > isophonics-drupal-site
view vendor/jakub-onderka/php-console-highlighter/README.md @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 4c8ae668cc8c |
children |
line wrap: on
line source
PHP Console Highlighter ======================= Highlight PHP code in console (terminal). Example -------  Install ------- Just create a `composer.json` file and run the `php composer.phar install` command to install it: ```json { "require": { "jakub-onderka/php-console-highlighter": "0.*" } } ``` Usage ------- ```php <?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); ``` ------ [](https://packagist.org/packages/jakub-onderka/php-console-highlighter) [](https://travis-ci.org/JakubOnderka/PHP-Console-Highlighter) [](https://packagist.org/packages/jakub-onderka/php-console-highlighter)