Things to evaluate when I have Emacs 26. * mhtml-mode (minor mode for mixed html/php etc.) * Eglot (maybe you can get formatting from some eglot thing for php) Useful Emacs websites \\ http://ergoemacs.org/emacs/emacs_html.html