GeSHi is a Generic Syntax Highlighter for PHP. The user inputs the source to be highlighted and a language to highlight it in, and GeSHi returns the source code, highlighted and formatted for the web.
It includes features for increasing the speed of highlighting, changing how the source is displayed and decreasing the amount of HTML source outputted for speed over slower connections.
GeSHi features also include:
* The ability to check for keywords in source code in either a case sensitive or non-case sensitive manner (for example, Java will only accept classes with TheCorrectCapitalisation, while in PHP it doesn't matter)
* The ability to auto-caps/auto-noncaps keywords in the source (particularly for SQL and older BASIC dialects)
* The ability to change the style of almost any aspect of the source on the fly, or even choose whether some parts of the source (for example, strings) are highlighted at all. The use of CSS means that the source can take on many aspects - rather than those provided by deprecated HTML elements such as <font>, <b> etc.
* The ability to use CSS classes to massively reduce the amount of outputted code.
* XHTML compliant output.
* Simple adding and removing languages.
* Function to URL conversion so functions can be linked to API documentation
* Line numbering, context highlighting and much, much more!
GeSHi requires PHP 4.1.0 or better. It requires no extra PHP extensions. |