php-parallel-lint/php-console-highlighter

Highlight PHP code in terminal

v1.0.0 2022-02-18 08:23 UTC

This package is auto-updated.

Last update: 2024-11-22 00:20:42 UTC


README

Highlight PHP code in console (terminal).

Example

Example

Install

Just run the following command to install it:

composer require --dev php-parallel-lint/php-console-highlighter:"0.*"

Usage

<?php
use PHP_Parallel_Lint\PhpConsoleColor\ConsoleColor;
use PHP_Parallel_Lint\PhpConsoleHighlighter\Highlighter;

require __DIR__ . '/vendor/autoload.php';

$highlighter = new Highlighter(new ConsoleColor());

$fileContent = file_get_contents(__FILE__);
echo $highlighter->getWholeFile($fileContent);

Downloads this Month CS Test License Coverage Status