Hacking on php-mode.el
It appears that php-mode for Emacs isn’t actively maintained any more. This is too bad, since I’m a PHP programmer who uses Emacs.
After waiting quite a while for a new version, I decided to take it upon myself to fix some of the problems I found instead.
- Class constants have correct font locking, both when declared and when used.
- The
__CLASS__constant is not highlighted as a class declaration anymore. __FILE__,__LINE__,__CLASS__, and__FUNCTION__are all correctly highlighted as constants.- Type-hinted variables passed as references (e.g.
function foo(Bar &$bar)) are now highlighted correctly.
There are still issues, but I think they’re outside my Lisp programming ability, for the moment. This is certainly an improvement for now, though.

March 16th, 2007 at 9:01 am
how to use message in “» Patch against PHP-mode.el v1.2.0″? It’s beyond my knowledge of emacs. :(
can yo drop a few words or give a hint?
March 25th, 2007 at 7:16 pm
Download the patch. Move it into the same directory as “php-mode.el.”
Run: “patch -p0 < php-mode-patch-1.patch”
Byte-compile the new php-mode.el; from Emacs, run: M-x byte-compile-file - then give it the path to php-mode.el.