t3nma c527ad0803 [COMPOSER] Add new php-ffmpeg package | %!s(int64=4) %!d(string=hai) anos | |
---|---|---|
.. | ||
examples | %!s(int64=4) %!d(string=hai) anos | |
src | %!s(int64=4) %!d(string=hai) anos | |
tests | %!s(int64=4) %!d(string=hai) anos | |
.gitignore | %!s(int64=4) %!d(string=hai) anos | |
.travis.yml | %!s(int64=4) %!d(string=hai) anos | |
LICENSE | %!s(int64=4) %!d(string=hai) anos | |
README.md | %!s(int64=4) %!d(string=hai) anos | |
build.xml | %!s(int64=4) %!d(string=hai) anos | |
composer.json | %!s(int64=4) %!d(string=hai) anos | |
phpunit.xml | %!s(int64=4) %!d(string=hai) anos |
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);