2014-08-02 06:24:56 +02:00
## PHP Syntax Highlighting
2016-03-02 20:49:58 +01:00
syntax "PHP" "\.php[2345s~]?$"
2014-08-02 06:24:56 +02:00
color white start="<\?(php|=)?" end="\?>"
# Functions
2018-08-09 10:09:19 +02:00
color blue "([a-zA-Z0-9_-]*)\("
2014-08-02 06:24:56 +02:00
# Constructs
2018-08-09 10:09:19 +02:00
color blue "(class|extends|goto) ([a-zA-Z0-9_]*)"
2015-12-15 08:44:09 +01:00
color green "[^a-z0-9_-]{1}(var|class|function|echo|case|break|default|exit|switch|if|else|elseif|endif|foreach|endforeach|@|while|public|private|protected|return|true|false|null|TRUE|FALSE|NULL|const|static|extends|as|array|require|include|require_once|include_once|define|do|continue|declare|goto|print|in|namespace|use)[^a-z0-9_-]{1}"
2018-08-09 10:09:19 +02:00
color blue "[a-zA-Z0-9]+:"
2014-08-02 06:24:56 +02:00
# Variables
color white "\$[a-zA-Z_0-9$]*|[=!<>]"
color white "\->[a-zA-Z_0-9$]*|[=!<>]"
# Special Characters
color yellow "[.,{}();]"
color yellow "\["
color yellow "\]"
color yellow "[=][^>]"
# Numbers
color magenta "[+-]*([0-9]\.)*[0-9]+([eE][+-]?([0-9]\.)*[0-9])*"
color magenta "0x[0-9a-zA-Z]*"
# Special Variables
2018-08-09 10:09:19 +02:00
color blue "(\$this|parent::|self::|\$this->)"
2014-08-02 06:24:56 +02:00
# Bitwise Operations
color magenta "(\;|\||\^){1}"
# And/Or/SRO/etc
color green "(\;\;|\|\||::|=>|->)"
# Online Comments
2018-08-09 10:09:19 +02:00
color yellow "(#.*|//.*)$"
2014-08-02 06:24:56 +02:00
# STRINGS!
2014-10-05 02:42:44 +02:00
color red "('[^']*')|(\"[^\"]*\")"
2014-08-02 06:24:56 +02:00
# Inline Variables
color white "\{\$[^}]*\}"
# PHP Tags
color red "(<\?(php)?|\?>)"
# General HTML
color red start="\?>" end="<\?(php|=)?"
# trailing whitespace
color ,green "[^[:space:]]{1}[[:space:]]+$"
# multi-line comments
2018-08-09 10:09:19 +02:00
color yellow start="/\*" end="\*/"