An A+ for effort; the indelible, scarlet letter of the dullard.
Not a Member? - Login or Create an Account...MC Offline
Sunday the 18th of February 2018 @ 02:39pm
Front Page Projects Your Profile About

PHP Simple Source Highlighter

The simple source highlighter is a simple php include that will turn a string containing C/C++, PHP or Bash script source into colourized, syntax highlighted versions of the same.

This code isn't particularly pretty or complete, but it works and it's simple to integrate if you quickly want to generate html examples of your source.

For some examples of source highlighting check out the examples page. If you like what you see, you can download it from the downloads page.

To be completely upfront, this code isn't particularly bright. Escaped characters will screw up the highlighting (where they effect things like quotes) and complex structures are likely to be displayed wrong. If you want a robust and efficient syntax highlighter, move along. :)

©2018 Aaron Cameron