HSA Test User c16dcac362 User import | 7 jaren geleden | |
---|---|---|
.. | ||
examples | 7 jaren geleden | |
src | 7 jaren geleden | |
tests | 7 jaren geleden | |
.gitignore | 7 jaren geleden | |
.travis.yml | 7 jaren geleden | |
LICENSE | 7 jaren geleden | |
README.md | 7 jaren geleden | |
build.xml | 7 jaren geleden | |
composer.json | 7 jaren geleden | |
phpunit.xml | 7 jaren geleden |
Highlight PHP code in console (terminal).
Just create a composer.json
file and run the php composer.phar install
command to install it:
{
"require": {
"jakub-onderka/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);