Skip to content

Commit 575f8fc

Browse files
committed
Added example.php
1 parent 908e471 commit 575f8fc

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

example.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)