Commit 53fc9a66 authored by Michael Francis's avatar Michael Francis Committed by Benno Schulenberg
Browse files

syntax: php: function and variable names can contain uppercase and digits

Reference: http://php.net/manual/en/language.variables.basics.php



Also color keywords differently from strings.
Signed-off-by: default avatarMichael Francis <mikefrancis95@gmail.com>
parent a95c6c5f
Showing with 5 additions and 5 deletions
+5 -5
...@@ -8,18 +8,18 @@ comment "//" ...@@ -8,18 +8,18 @@ comment "//"
color brightgreen "(<\?(php)?|\?>)" color brightgreen "(<\?(php)?|\?>)"
# Function names. # Function names.
color white "\<[a-z_]*\(" color white "\<[A-Za-z_][A-Za-z_0-9]*\("
# Variable names. # Variable names.
color cyan "\$[a-z_]+" color cyan "\$[A-Za-z_][A-Za-z_0-9]*"
# Types. # Types.
color green "\<(array|bool|callable|const|float|global|int|object|string|var)\>" color green "\<(array|bool|callable|const|float|global|int|object|string|var)\>"
# Directives and structure. # Directives and structure.
color brightyellow "\<(abstract|as|class|clone|(end)?declare|extends|function|implements|include(_once)?|inst(ance|ead)of|interface|namespace|new|private|protected|public|require(_once)?|static|trait|use|yield)\>" color brightcyan "\<(abstract|as|class|clone|(end)?declare|extends|function|implements|include(_once)?|inst(ance|ead)of|interface|namespace|new|private|protected|public|require(_once)?|static|trait|use|yield)\>"
color brightyellow "\<(case|catch|default|do|echo|else(if)?|end(for(each)?|if|switch|while)|final(ly)?|for(each)?|if|print|switch|throw|try|while)\>" color brightcyan "\<(case|catch|default|do|echo|else(if)?|end(for(each)?|if|switch|while)|final(ly)?|for(each)?|if|print|switch|throw|try|while)\>"
# Operators. # Operators.
color brightyellow "\<(and|or|xor)\>" color brightcyan "\<(and|or|xor)\>"
# Control flow. # Control flow.
color magenta "\<(break|continue|goto|return)\>" color magenta "\<(break|continue|goto|return)\>"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment