Nice. I use a simple call to php -l for syntax check and this defun to create ChangeLog style commits.
;; Guess current function.
(defun dmaus/php-mode/guess-current-function-or-variable ()
"Return name of current function."
(interactive)
(let (func)
(save-excursion
(while (and (null func)
(re-search-backward "{[^}]*" nil t))
(if (looking-back
"function[ \t\r\n]+\\([[:alnum:]_]+\\)[ \t\r\n]*([^)]*)[ \t\r\n]*")
(setq func (match-string-no-properties 1)))))
(unless func
(let ((line (thing-at-point 'line)))
(cond
((string-match "\\($[[:alnum:]_]+\\)" line)
(setq func (match-string-no-properties 1 line)))
((string-match "const[ \t]+\\([A-Z0-9_]+\\)" line)
(setq func (match-string-no-properties 1 line))))))
func))
Maybe another thing to mentions is PHP_Repl, a PHP REPL with Emacs support.The fork at
https://github.com/dmj/php_rep...
contains the fixes to make Emacs support actually work. M-x run-php RET -- sometimes quite hand.
dmaus