Programming Tips - PHP: Which php syntax highlighter should I use?
Date: 2016feb1
Language: php
Q. PHP: 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.
geshi
Good:
- Included as a package with my distro (php-geshi)
- Supports more languages than hyperlight (including java)
- Can turn keywords into links
Other:
- Uses hardcoded properties (eg color) its output html which is a bit ugly. But then
you don't need to include a style sheet.
hyperlight
Bad:
- Doesn't support Java highlighting
Other:
- Uses css class names in output html which is better style but then you need
to include the style sheet in your website
javascript
There are a few javacript highlighters too.