We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 908e471 commit 575f8fcCopy full SHA for 575f8fc
example.php
@@ -0,0 +1,16 @@
1
+<?php
2
+use Colors\Color;
3
+use JakubOnderka\PhpConsoleHighlighter\Highlighter;
4
+
5
+$colors = new Color();
6
+$colors->setTheme(array(
7
+ Highlighter::TOKEN_STRING => 'red',
8
+ Highlighter::TOKEN_COMMENT => 'yellow',
9
+ Highlighter::TOKEN_KEYWORD => 'green',
10
+ Highlighter::TOKEN_DEFAULT => 'white',
11
+ Highlighter::TOKEN_HTML => 'cyan'
12
+));
13
+$highlighter = new Highlighter($colors);
14
15
+$fileContent = file_get_contents(__DIR__ . '/example.php');
16
+echo $highlighter->getWholeFile($fileContent);
0 commit comments