Tuesday, April 18, 2006

php-mode.el

php-mode now comes in syntax-checking flavour, at least if you have the cli version of php installed (type php --version in a shell, you should get something like PHP 5.0.5-2 ...)

You can press F12 the check the syntax of the current buffer, or put the following code into you .emacs file to do a syntax-check after saving a php file.

;;; perform syntax check after saving a php file
(defun php-check-syntax-hook ()
(when (string-match "\.php$" buffer-file-truename)
  (php-check-syntax)))

(add-hook 'after-save-hook 'php-check-syntax-hook)

download php-mode.el

No comments: