Dave's Brain

Browse - Programming Tips - Which php syntax highlighter should I use?

Date: 2016feb1
Language: php

Q.  Which php syntax highlighter should I use?

A.  There appear to be 2 major ones.
They both have similar usage.  They both include plugins for several languages.
Either can detect language.


- Included as a package with my distro (php-geshi)
- Supports more languages than hyperlight (including java)
- Can turn keywords into links

- Uses hardcoded properties (eg color) its output html which is a bit ugly.  But then
you don't need to include a style sheet.


- Doesn't support java highlighting

- Uses css class names in output html which is better style but then you need
to include the style sheet in your website


There are a few javacript highlighters too.

Add a comment

Sign in to add a comment
Copyright © 2008-2018, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.