PHPLighter

Download Link: Download from GitHub

Overview

PHPLighter is a PHP highlighting engine designed to highlight PHP files like a real IDE would, instead of the basic/crappy highlighting provided by the built-in functions. It uses token_get_all() which allows you to tap into the Zend Engine that parses PHP (Written in C, so very fast). Most libraries just use some basic regex, and you end up with OK syntax highlighting, but nothing special. Using the library I built, you can easily get syntax highlighting that rivals editors like Sublime Text 2 or Eclipse. I’ve put it on GitHub, so go check it out!

Or check out this example of it in action.

I’d like to expand the code and write it a little nicer, then make it into a WordPress plugin too.