PHP Mode is a major mode for editing PHP script. It is based on CC Mode.
- MELPA: https://melpa.org/#/php-mode
- Debian: https://packages.debian.org/sid/elpa-php-mode
- Other: https://repology.org/project/emacs:php-mode/versions
web-mode is an autonomous emacs major mode for editing HTML and web templates. This mode supports Smarty, Twig, Blade, and many other template languages.
- Web site: http://web-mode.org/
- MELPA: https://melpa.org/#/web-mode
phps-mode is a new major mode for editing PHP. It based on Semantic(CEDET) and does not depend on the PHP runtime.
- GNU ELPA: https://elpa.gnu.org/packages/phps-mode.html
- GitHub: https://github.com/cjohansson/emacs-phps-mode
Although js-mode is NOT a mode for PHP editing, this mode is included in Emacs, so it is useful in environments where additional packages can not be installed.
For example if you are a server engineer, for example if you are logging into a customer’s server and reading the code.
(unless (or (featurep 'php-mode) (featurep 'phps-mode))
(add-to-list 'auto-mode-alist '("\\.php\\'" . js-mode)))