From the documentation: > The function takes the same argument as `beginning-of-defun' and should behave similarly, returning **non-nil** if it found the beginning of a defun. So this code will always fail: ```elisp (defsubst in-function-p (&optional pos) "Determine whether POS is inside a function." (let (bof (pos (or pos (point)))) (save-excursion (when (beginning-of-defun) (setq bof (point)) (end-of-defun) (and (> pos bof) (< pos (point))))))) ``` because `(beginning-of-defun)` always return `nil` in php-mode.