php-parallel-lint / php-console-highlighter
在终端中突出显示PHP代码
v1.0.0
2022-02-18 08:23 UTC
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
在控制台(终端)中突出显示PHP代码。
示例
安装
只需运行以下命令即可安装
composer require --dev php-parallel-lint/php-console-highlighter:"0.*"
用法
<?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);