Skip to content

Commit 53aeb8b

Browse files
committed
test: example stub
1 parent 11526f7 commit 53aeb8b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/example.phps

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
use Ahc\CliSyntax\Highlighter;
4+
5+
require_once __DIR__ . '/src/Highlighter.php';
6+
7+
// Highlight code
8+
echo (new Highlighter("<?php echo 'Hello world!'?>\n"))->highlight();
9+
10+
// Highlight file
11+
echo Highlighter::for(__FILE__)->highlight();
12+
13+
// Magic string works too:
14+
// echo new Highlighter('<?php echo "Hello world!";');
15+
// echo Highlighter::for(__FILE__);
16+


0 commit comments

Comments
 (0)