|
|
4 vuotta sitten | |
|---|---|---|
| .. | ||
| examples | 4 vuotta sitten | |
| src | 4 vuotta sitten | |
| tests | 4 vuotta sitten | |
| .gitignore | 4 vuotta sitten | |
| .travis.yml | 4 vuotta sitten | |
| LICENSE | 4 vuotta sitten | |
| README.md | 4 vuotta sitten | |
| build.xml | 4 vuotta sitten | |
| composer.json | 4 vuotta sitten | |
| phpunit.xml | 4 vuotta sitten | |
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);