I'm using Emacs web-mode and write a setting for it like this.
(require 'web-mode)
(add-to-list 'auto-mode-alist '("\\.php\\'" . web-mode))
(defun web-mode-hook ()
"Hooks for Web mode."
(setq web-mode-markup-indent-offset 2) ;; html indent
(setq web-mode-css-indent-offset 2) ;; css indent
(setq web-mode-code-indent-offset 2))
(add-hook 'web-mode-hook 'web-mode-hook)
But indent of php code remain 8. (HTML indent is 2 as I expected) Why does not change the offset indention of php?