Finally,
a patch fork
that adds support for namespaces, heredoc and the support of # as comment character
for this version of php-mode.
To apply it, download
the patch and execute this simple command line
patch php-mode.el < php-mode.el.diff
After restarting Emacs, you should obtain something like this
# is finally rendered correctly namespace Pi\Truc\Bidule; use Pi\XmlTag, Pi\Lib\String; use Pi\Glob, Pi\Lib\String as PiStr; Pi\XmlTag::test(); $xml = new Pi\XmlTag(); function foo(Pi\XmlTag $bla, PiStr $blo) {} echo 'L\'ananas';