php-parallel-lint / php-console-highlighter
Highlight PHP code in terminal
Installs: 20 684 282
Dependents: 524
Suggesters: 5
Security: 0
Stars: 85
Watchers: 3
Forks: 7
Open Issues: 0
Requires
- php: >=5.3.2
- ext-tokenizer: *
- php-parallel-lint/php-console-color: ^1.0.1
Requires (Dev)
- php-parallel-lint/php-code-style: ^2.0
- php-parallel-lint/php-parallel-lint: ^1.0
- php-parallel-lint/php-var-dump-check: 0.*
- phpunit/phpunit: ^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0
Replaces
README
Highlight PHP code in console (terminal).
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);