Created
July 2, 2012 16:26
-
-
Save ThijsFeryn/3034094 to your computer and use it in GitHub Desktop.
Using highlight_file to perform syntax highlighting in PHP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Echo directly | |
highlight_file('test.php'); | |
//Store in variable first | |
$source = highlight_file('test.php', true); | |
echo $source; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment