We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 55c59ea + b3a0445 commit 8cd3f5dCopy full SHA for 8cd3f5d
lisp/php.el
@@ -223,7 +223,17 @@ it is the character that will terminate the string, or t if the string should be
223
(bound-and-true-p poly-php-html-mode))
224
225
(defconst php-beginning-of-defun-regexp
226
- "^\\s-*\\(?:\\(?:abstract\\|final\\|private\\|protected\\|public\\|static\\)\\s-+\\)*function\\s-+&?\\(\\(\\sw\\|\\s_\\)+\\)\\s-*("
+ (eval-when-compile
227
+ (rx bol
228
+ (* (syntax whitespace))
229
+ (* (or "abstract" "final" "private" "protected" "public" "static")
230
+ (+ (syntax whitespace)))
231
+ "function"
232
+ (+ (syntax whitespace))
233
+ (? "&" (* (syntax whitespace)))
234
+ (group (+ (or (syntax word) (syntax symbol))))
235
236
+ "("))
237
"Regular expression for a PHP function.")
238
239
(eval-when-compile
0 commit comments