Skip to content

Instantly share code, notes, and snippets.

@ThijsFeryn
Created July 2, 2012 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThijsFeryn/3034094 to your computer and use it in GitHub Desktop.
Save ThijsFeryn/3034094 to your computer and use it in GitHub Desktop.
Using highlight_file to perform syntax highlighting in PHP
<?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