/config/syntax/PHP.rb
Ruby | 1154 lines | 1150 code | 1 blank | 3 comment | 1 complexity | 07430b025b382c13fd1dd6d370ceee3e MD5 | raw file
Large files files are truncated, but you can click here to view the full file
- # Encoding: UTF-8
- {comment:
- "TODO:\n• Try to improve parameters list syntax – scope numbers, ‘=’, ‘,’ and possibly be intelligent about entity ordering\n• Is meta.function-call the correct scope? I've added it to my theme but by default it's not highlighted",
- firstLineMatch: "^#!.*(?<!-)php[0-9]{0,1}\\b",
- foldingStartMarker: /(?<_1>\/\*|\{\s*$|<<<HTML)/,
- foldingStopMarker: /(?<_1>\*\/|^\s*\}|^HTML;)/,
- name: "PHP",
- patterns:
- [{captures:
- {1 => {name: "punctuation.whitespace.embedded.leading.php"},
- 2 => {name: "source.php.embedded.line.empty.html"},
- 3 => {name: "punctuation.section.embedded.begin.php"},
- 4 => {name: "meta.consecutive-tags.php"},
- 5 => {name: "source.php"},
- 6 => {name: "punctuation.section.embedded.end.php"},
- 7 => {name: "source.php"},
- 8 => {name: "punctuation.whitespace.embedded.trailing.php"}},
- comment: "Matches empty tags.",
- match:
- /(?x)
- (?<_1>^\s*)? # 1 - Leading whitespace
- (?<_2> # 2 - meta.embedded.line.empty.php
- (?<_3> # 3 - Open Tag
- (?:
- (?<_4>(?<=\?>)<) # 4 - Consecutive tags
- | <
- )
- \?(?i:php|=)?
- )
- (?<_5>\s*) # 5 - Loneliness
- (?<_6>(?<_7>\?)>) # 6 - Close Tag
- # 7 - Scope ? as scope.php
- )
- (?<_8>
- \k<_1> # Match nothing if there was no
- # leading whitespace...
- | (?<_9>\s*$\n)? # or match trailing whitespace.
- )
- /},
- {begin: /^\s*(?=<\?)/,
- beginCaptures:
- {0 => {name: "punctuation.whitespace.embedded.leading.php"}},
- comment: "Catches tags with preceeding whitespace.",
- end: "(?<=\\?>)(\\s*$\\n)?",
- endCaptures: {0 => {name: "punctuation.whitespace.embedded.trailing.php"}},
- patterns:
- [{begin: /<\?(?i:php|=)?/,
- beginCaptures: {0 => {name: "punctuation.section.embedded.begin.php"}},
- end: "(\\?)>",
- endCaptures:
- {0 => {name: "punctuation.section.embedded.end.php"},
- 1 => {name: "source.php"}},
- name: "source.php.embedded.block.html",
- patterns: [{include: "#language"}]}]},
- {begin: /(?<_1>(?<_2>(?<=\?>)<)|<)\?(?i:php|=)?/,
- beginCaptures:
- {0 => {name: "punctuation.section.embedded.begin.php"},
- 2 => {name: "meta.consecutive-tags.php"}},
- comment: "Catches the remainder.",
- end: "(\\?)>",
- endCaptures:
- {0 => {name: "punctuation.section.embedded.end.php"},
- 1 => {name: "source.php"}},
- name: "source.php.embedded.line.html",
- patterns: [{include: "#language"}]}],
- repository:
- {constants:
- {patterns:
- [{match:
- /(?i)\b(?<_1>TRUE|FALSE|NULL|__(?<_2>FILE|FUNCTION|CLASS|METHOD|LINE)__|ON|OFF|YES|NO|NL|BR|TAB)\b/,
- name: "constant.language.php"},
- {match:
- /\b(?<_1>DEFAULT_INCLUDE_PATH|E_(?<_2>ALL|COMPILE_(?<_3>ERROR|WARNING)|CORE_(?<_4>ERROR|WARNING)|(?<_5>RECOVERABLE_)?ERROR|NOTICE|PARSE|STRICT|USER_(?<_6>ERROR|NOTICE|WARNING)|WARNING)|PEAR_(?<_7>EXTENSION_DIR|INSTALL_DIR)|PHP_(?<_8>BINDIR|CONFIG_FILE_PATH|DATADIR|E(?<_9>OL|XTENSION_DIR)|L(?<_10>IBDIR|OCALSTATEDIR)|O(?<_11>S|UTPUT_HANDLER_CONT|UTPUT_HANDLER_END|UTPUT_HANDLER_START)|SYSCONFDIR|VERSION))\b/,
- name: "support.constant.core.php"},
- {match:
- /\b(?<_1>A(?<_2>B(?<_3>DAY_(?<_4>[1-7])|MON_(?<_5>[0-9]{1,2}))|LT_DIGITS|M_STR|SSERT_(?<_6>ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(?<_7>ASE_(?<_8>LOWER|UPPER)|HAR_MAX|O(?<_9>DESET|NNECTION_(?<_10>ABORTED|NORMAL|TIMEOUT)|UNT_(?<_11>NORMAL|RECURSIVE))|REDITS_(?<_12>ALL|DOCS|FULLPAGE|GENERAL|GROUP|MODULES|QA|SAPI)|RNCYSTR|RYPT_(?<_13>BLOWFISH|EXT_DES|MD5|SALT_LENGTH|STD_DES)|URRENCY_SYMBOL)|D(?<_14>AY_(?<_15>[1-7])|ECIMAL_POINT|IRECTORY_SEPARATOR|_(?<_16>FMT|T_FMT))|E(?<_17>NT_(?<_18>COMPAT|NOQUOTES|QUOTES)|RA(?<_19>|_D_FMT|_D_T_FMT|_T_FMT|_YEAR)|XTR_(?<_20>IF_EXISTS|OVERWRITE|PREFIX_(?<_21>ALL|IF_EXISTS|INVALID|SAME)|SKIP))|FRAC_DIGITS|GROUPING|HTML_(?<_22>ENTITIES|SPECIALCHARS)|IN(?<_23>FO_(?<_24>ALL|CONFIGURATION|CREDITS|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|I_(?<_25>ALL|PERDIR|SYSTEM|USER)|T_(?<_26>CURR_SYMBOL|FRAC_DIGITS))|L(?<_27>C_(?<_28>ALL|COLLATE|CTYPE|MESSAGES|MONETARY|NUMERIC|TIME)|O(?<_29>CK_(?<_30>EX|NB|SH|UN)|G_(?<_31>ALERT|AUTH(?<_32>|PRIV)|CONS|CRIT|CRON|DAEMON|DEBUG|EMERG|ERR|INFO|KERN|LOCAL(?<_33>[0-7])|LPR|MAIL|NDELAY|NEWS|NOTICE|NOWAIT|ODELAY|PERROR|PID|SYSLOG|USER|UUCP|WARNING)))|M(?<_34>ON_(?<_35>[0-9]{1,2}|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|YSQL_(?<_36>ASSOC|BOTH|NUM)|_(?<_37>1_PI|2_(?<_38>PI|SQRTPI)|E|L(?<_39>N10|N2|OG(?<_40>10E|2E))|PI(?<_41>|_2|_4)|SQRT1_2|SQRT2))|N(?<_42>EGATIVE_SIGN|O(?<_43>EXPR|STR)|_(?<_44>CS_PRECEDES|SEP_BY_SPACE|SIGN_POSN))|P(?<_45>ATH(?<_46>INFO_(?<_47>BASENAME|DIRNAME|EXTENSION|FILENAME)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(?<_48>CS_PRECEDES|SEP_BY_SPACE|SIGN_POSN))|RADIXCHAR|S(?<_49>EEK_(?<_50>CUR|END|SET)|ORT_(?<_51>ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(?<_52>BOTH|LEFT|RIGHT))|T(?<_53>HOUS(?<_54>ANDS_SEP|EP)|_(?<_55>FMT(?<_56>|_AMPM)))|YES(?<_57>EXPR|STR))\b/,
- name: "support.constant.std.php"},
- {comment:
- "In PHP, any identifier which is not a variable is taken to be a constant.\n\t\t\t\tHowever, if there is no constant defined with the given name then a notice\n\t\t\t\tis generated and the constant is assumed to have the value of its name.",
- match: /[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/n,
- name: "constant.other.php"}]},
- :"function-call" =>
- {match: /[A-Za-z_][A-Za-z_0-9]*(?=\s*\()/, name: "meta.function-call.php"},
- instantiation:
- {captures:
- {1 => {name: "keyword.other.new.php"},
- 2 => {name: "variable.other.php"},
- 3 => {name: "support.class.php"},
- 4 => {name: "support.class.php"}},
- match:
- /(?i)\b(?<_1>new)\s+(?:(?<_2>\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)|(?<_3>\w+))|(?<_4>\w+)(?=::)/n},
- interpolation:
- {comment:
- "http://www.php.net/manual/en/language.types.string.php#language.types.string.parsing",
- patterns:
- [{match: /\\[0-7]{1,3}/, name: "constant.numeric.octal.php"},
- {match: /\\x[0-9A-Fa-f]{1,2}/, name: "constant.numeric.hex.php"},
- {match: /\\[nrt\\\$\"]/, name: "constant.character.escape.php"},
- {captures:
- {1 => {name: "variable.other.php"},
- 2 => {name: "punctuation.definition.variable.php"},
- 4 => {name: "punctuation.definition.variable.php"}},
- comment: "Simple syntax with braces: \"foo${bar}baz\"",
- match:
- /(?x)
- (?<_1>(?<_2>\$\{)(?<name>[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)(?<_3>\}))
- /n},
- {captures:
- {1 => {name: "variable.other.php"},
- 10 => {name: "punctuation.definition.variable.php"},
- 11 => {name: "string.unquoted.index.php"},
- 12 => {name: "invalid.illegal.invalid-simple-array-index.php"},
- 13 => {name: "keyword.operator.index-end.php"},
- 2 => {name: "punctuation.definition.variable.php"},
- 4 => {name: "keyword.operator.class.php"},
- 5 => {name: "variable.other.property.php"},
- 6 => {name: "invalid.illegal.php"},
- 7 => {name: "keyword.operator.index-start.php"},
- 8 => {name: "constant.numeric.index.php"},
- 9 => {name: "variable.other.index.php"}},
- comment: "Simple syntax: $foo, $foo[0], $foo[$bar], $foo->bar",
- match:
- /(?x)
- (?<_1>(?<_2>\$)(?<name>[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*))
- (?:
- (?<_3>->)
- (?:
- (?<_4>\g<name>)
- |
- (?<_5>\$\g<name>)
- )
- |
- (?<_6>\[)
- (?:(?<_7>\d+)|(?<_8>(?<_9>\$)\g<name>)|(?<_10>\w+)|(?<_11>.*?))
- (?<_12>\])
- )?
- /n},
- {begin:
- /(?=(?<regex>(?#simple syntax)\$(?<name>[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)(?:\[(?<index>[a-zA-Z0-9_\x7f-\xff]+|\$\g<name>)\]|->\g<name>(?<_1>\(.*?\))?)?|(?#simple syntax with braces)\$\{(?:\g<name>(?<indices>\[(?:\g<index>|'(?:\\.|[^'\\])*'|"(?:\g<regex>|\\.|[^"\\])*")\])?|\g<complex>|\$\{\g<complex>\})\}|(?#complex syntax)\{(?<complex>\$(?<segment>\g<name>(?<_2>\g<indices>*|\(.*?\))?)(?:->\g<segment>)*|\$\g<complex>|\$\{\g<complex>\})\}))\{/n,
- beginCaptures: {0 => {name: "punctuation.definition.variable.php"}},
- comment:
- "Complex syntax. It seems this now supports complex method calls, as of PHP5.\n\t\t\t\t\t\t\t I've put wildcards into the function call parameter lists to handle this, but this may break the pattern.\n\t\t\t\t\t\t\t It also might be better to disable it as I shouldn't imagine it's used often (hopefully) and it may confuse PHP4 users.",
- end: "\\}",
- endCaptures: {0 => {name: "punctuation.definition.variable.php"}},
- patterns:
- [{include: "#function-call"},
- {include: "#var_basic"},
- {include: "#object"},
- {include: "#numbers"},
- {match: /\[/, name: "keyword.operator.index-start.php"},
- {match: /\]/, name: "keyword.operator.index-end.php"}]}]},
- language:
- {patterns:
- [{begin: /(?=<<<\s*(?<_1>HTML|XML|SQL|JAVASCRIPT|CSS)\s*$)/,
- end: "(?!<?<<\\s*(HTML|XML|SQL|JAVASCRIPT|CSS)\\s*$)",
- name: "string.unquoted.heredoc.php",
- patterns:
- [{begin: /(?<_1><<<)\s*(?<_2>HTML)\s*$\n?/,
- beginCaptures:
- {0 => {name: "punctuation.section.embedded.begin.php"},
- 1 => {name: "punctuation.definition.string.php"},
- 2 => {name: "keyword.operator.heredoc.php"}},
- contentName: "text.html",
- end: "^(HTML)(;?)$\\n?",
- endCaptures:
- {0 => {name: "punctuation.section.embedded.end.php"},
- 1 => {name: "keyword.operator.heredoc.php"},
- 2 => {name: "punctuation.definition.string.php"}},
- name: "meta.embedded.html",
- patterns:
- [{include: "text.html.basic"}, {include: "#interpolation"}]},
- {begin: /(?<_1><<<)\s*(?<_2>XML)\s*$\n?/,
- beginCaptures:
- {0 => {name: "punctuation.section.embedded.begin.php"},
- 1 => {name: "punctuation.definition.string.php"},
- 2 => {name: "keyword.operator.heredoc.php"}},
- contentName: "text.xml",
- end: "^(XML)(;?)$\\n?",
- endCaptures:
- {0 => {name: "punctuation.section.embedded.end.php"},
- 1 => {name: "keyword.operator.heredoc.php"},
- 2 => {name: "punctuation.definition.string.php"}},
- name: "meta.embedded.xml",
- patterns: [{include: "text.xml"}, {include: "#interpolation"}]},
- {begin: /(?<_1><<<)\s*(?<_2>SQL)\s*$\n?/,
- beginCaptures:
- {0 => {name: "punctuation.section.embedded.begin.php"},
- 1 => {name: "punctuation.definition.string.php"},
- 2 => {name: "keyword.operator.heredoc.php"}},
- contentName: "source.sql",
- end: "^(SQL)(;?)$\\n?",
- endCaptures:
- {0 => {name: "punctuation.section.embedded.end.php"},
- 1 => {name: "keyword.operator.heredoc.php"},
- 2 => {name: "punctuation.definition.string.php"}},
- name: "meta.embedded.sql",
- patterns: [{include: "source.sql"}, {include: "#interpolation"}]},
- {begin: /(?<_1><<<)\s*(?<_2>JAVASCRIPT)\s*$\n?/,
- beginCaptures:
- {0 => {name: "punctuation.section.embedded.begin.php"},
- 1 => {name: "punctuation.definition.string.php"},
- 2 => {name: "keyword.operator.heredoc.php"}},
- contentName: "source.js",
- end: "^(JAVASCRIPT)(;?)$\\n?",
- endCaptures:
- {0 => {name: "punctuation.section.embedded.end.php"},
- 1 => {name: "keyword.operator.heredoc.php"},
- 2 => {name: "punctuation.definition.string.php"}},
- name: "meta.embedded.js",
- patterns: [{include: "source.js"}, {include: "#interpolation"}]},
- {begin: /(?<_1><<<)\s*(?<_2>CSS)\s*$\n?/,
- beginCaptures:
- {0 => {name: "punctuation.section.embedded.begin.php"},
- 1 => {name: "punctuation.definition.string.php"},
- 2 => {name: "keyword.operator.heredoc.php"}},
- contentName: "source.css",
- end: "^(CSS)(;?)$\\n?",
- endCaptures:
- {0 => {name: "punctuation.section.embedded.end.php"},
- 1 => {name: "keyword.operator.heredoc.php"},
- 2 => {name: "punctuation.definition.string.php"}},
- name: "meta.embedded.css",
- patterns: [{include: "source.css"}, {include: "#interpolation"}]}]},
- {begin: /\/\*\*(?:\#@\+)?\s*$/,
- captures: {0 => {name: "punctuation.definition.comment.php"}},
- comment:
- "This now only highlights a docblock if the first line contains only /**\n\t\t\t\t\t\t\t\t- this is to stop highlighting everything as invalid when people do comment banners with /******** ...\n\t\t\t\t\t\t\t\t- Now matches /**\#@+ too - used for docblock templates: http://manual.phpdoc.org/HTMLframesConverter/default/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html#basics.docblocktemplate",
- end: "\\*/",
- name: "comment.block.documentation.phpdoc.php",
- patterns: [{include: "#php_doc"}]},
- {begin: /\/\*/,
- captures: {0 => {name: "punctuation.definition.comment.php"}},
- end: "\\*/",
- name: "comment.block.php"},
- {captures: {1 => {name: "punctuation.definition.comment.php"}},
- match: /(?<_1>\/\/).*?(?<_2>$\n?|(?=\?>))/,
- name: "comment.line.double-slash.php"},
- {captures: {1 => {name: "punctuation.definition.comment.php"}},
- match: /(?<_1>#).*?(?<_2>$\n?|(?=\?>))/,
- name: "comment.line.number-sign.php"},
- {begin:
- /^(?i)\s*(?<_1>interface)\s+(?<_2>[a-z0-9_]+)\s*(?<_3>extends)?\s*/,
- beginCaptures:
- {1 => {name: "storage.type.interface.php"},
- 2 => {name: "entity.name.type.interface.php"},
- 3 => {name: "storage.modifier.extends.php"}},
- end: "$",
- name: "meta.interface.php",
- patterns:
- [{match: /[a-zA-Z0-9_]+/, name: "entity.other.inherited-class.php"}]},
- {begin:
- /(?i)^\s*(?<_1>abstract|final)?\s*(?<_2>class)\s+(?<_3>[a-z0-9_]+)\s*/,
- beginCaptures:
- {1 => {name: "storage.modifier.abstract.php"},
- 2 => {name: "storage.type.class.php"},
- 3 => {name: "entity.name.type.class.php"}},
- end: "$",
- name: "meta.class.php",
- patterns:
- [{captures:
- {1 => {name: "storage.modifier.extends.php"},
- 2 => {name: "entity.other.inherited-class.php"}},
- match: /(?i:(?<_1>extends))\s+(?<_2>[a-zA-Z0-9_]+)\s*/},
- {begin: /(?i:(?<_1>implements))\s+(?<_2>[a-zA-Z0-9_]+)\s*/,
- beginCaptures:
- {1 => {name: "storage.modifier.implements.php"},
- 2 => {name: "support.class.implements.php"}},
- end: "(?=\\s*\\b(?i:(extends)))|$",
- patterns:
- [{captures: {1 => {name: "support.class.implements.php"}},
- match: /,\s*(?<_1>[a-zA-Z0-9_]+)\s*/}]}]},
- {match:
- /\b(?<_1>break|c(?<_2>ase|ontinue)|d(?<_3>e(?<_4>clare|fault)|ie|o)|e(?<_5>lse(?<_6>if)?|nd(?<_7>declare|for(?<_8>each)?|if|switch|while)|xit)|for(?<_9>each)?|if|return|switch|use|while)\b/,
- name: "keyword.control.php"},
- {begin: /(?i)\b(?<_1>(?:require|include)(?:_once)?)\b\s*/,
- beginCaptures: {1 => {name: "keyword.control.import.include.php"}},
- end: "(?=\\s|;|$)",
- name: "meta.include.php",
- patterns: [{include: "#language"}]},
- {captures:
- {1 => {name: "keyword.control.exception.php"},
- 2 => {name: "support.class.php"},
- 3 => {name: "variable.other.php"},
- 4 => {name: "punctuation.definition.variable.php"}},
- match:
- /\b(?<_1>catch)\b\s*\(\s*(?<_2>[A-Za-z_][A-Za-z_0-9]*)\s*(?<_3>(?<_4>\$+)[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)\s*\)/n,
- name: "meta.catch.php"},
- {match: /\b(?<_1>catch|try|throw|exception)\b/,
- name: "keyword.control.exception.php"},
- {begin:
- /(?:^\s*)(?<_1>(?:(?:final|abstract|public|private|protected|static)\s+)*)(?<_2>function)(?:\s+|(?<_3>\s*&\s*))(?:(?<_4>__(?:call|(?:con|de)struct|get|(?:is|un)?set|tostring|clone|set_state|sleep|wakeup|autoload))|(?<_5>[a-zA-Z0-9_]+))\s*(?<_6>\()/,
- beginCaptures:
- {1 => {name: "storage.modifier.php"},
- 2 => {name: "storage.type.function.php"},
- 3 => {name: "storage.modifier.reference.php"},
- 4 => {name: "support.function.magic.php"},
- 5 => {name: "entity.name.function.php"},
- 6 => {name: "punctuation.definition.parameters.begin.php"}},
- contentName: "meta.function.arguments.php",
- end: "\\)",
- endCaptures:
- {1 => {name: "punctuation.definition.parameters.end.php"}},
- name: "meta.function.php",
- patterns:
- [{begin:
- /(?x)
- \s*(?<_1>array) # Typehint
- \s*(?<_2>&)? # Reference
- \s*(?<_3>(?<_4>\$+)[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*) # The variable name
- \s*(?<_5>=) # A default value
- \s*(?<_6>array)\s*(?<_7>\()
- /n,
- beginCaptures:
- {1 => {name: "storage.type.php"},
- 2 => {name: "storage.modifier.php"},
- 3 => {name: "variable.other.php"},
- 4 => {name: "punctuation.definition.variable.php"},
- 5 => {name: "keyword.operator.assignment.php"},
- 6 => {name: "support.function.construct.php"},
- 7 => {name: "punctuation.definition.array.begin.php"}},
- contentName: "meta.array.php",
- end: "\\)",
- endCaptures: {0 => {name: "punctuation.definition.array.end.php"}},
- name: "meta.function.argument.array.php",
- patterns: [{include: "#strings"}, {include: "#numbers"}]},
- {captures:
- {1 => {name: "storage.type.php"},
- 2 => {name: "storage.modifier.php"},
- 3 => {name: "variable.other.php"},
- 4 => {name: "punctuation.definition.variable.php"},
- 5 => {name: "keyword.operator.assignment.php"},
- 6 => {name: "constant.language.php"},
- 7 => {name: "invalid.illegal.non-null-typehinted.php"}},
- match:
- /(?x)
- \s*(?<_1>array) # Typehint
- \s*(?<_2>&)? # Reference
- \s*(?<_3>(?<_4>\$+)[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*) # The variable name
- (?:
- \s*(?<_5>=) # A default value
- \s*(?i:
- (?<_6>NULL)
- |
- (?<_7>\S.*?)
- )?
- )?
- \s*(?=,|\)) # A closing parentheses (?<_8>end of argument list) or a comma
- /n,
- name: "meta.function.argument.array.php"},
- {captures:
- {1 => {name: "support.class.php"},
- 2 => {name: "storage.modifier.php"},
- 3 => {name: "variable.other.php"},
- 4 => {name: "punctuation.definition.variable.php"},
- 5 => {name: "keyword.operator.assignment.php"},
- 6 => {name: "constant.language.php"},
- 7 => {name: "invalid.illegal.non-null-typehinted.php"}},
- match:
- /(?x)
- \s*(?<_1>[A-Za-z_][A-Za-z_0-9]*) # Typehinted class name
- \s*(?<_2>&)? # Reference
- \s*(?<_3>(?<_4>\$+)[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*) # The variable name
- (?:
- \s*(?<_5>=) # A default value
- \s*(?i:
- (?<_6>NULL)
- |
- (?<_7>\S.*?)
- )?
- )?
- \s*(?=,|\)) # A closing parentheses (?<_8>end of argument list) or a comma
- /n,
- name: "meta.function.argument.typehinted.php"},
- {captures:
- {1 => {name: "storage.modifier.php"},
- 2 => {name: "variable.other.php"},
- 3 => {name: "punctuation.definition.variable.php"}},
- match:
- /(?<_1>\s*&)?\s*(?<_2>(?<_3>\$+)[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)\s*(?=,|\))/n,
- name: "meta.function.argument.no-default.php"},
- {begin:
- /(?<_1>\s*&)?\s*(?<_2>(?<_3>\$+)[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)(?:\s*(?<_4>=)\s*)\s*/n,
- captures:
- {1 => {name: "storage.modifier.php"},
- 2 => {name: "variable.other.php"},
- 3 => {name: "punctuation.definition.variable.php"},
- 4 => {name: "keyword.operator.assignment.php"}},
- end: "(?=,|\\))",
- name: "meta.function.argument.default.php",
- patterns: [{include: "#parameter-default-types"}]},
- {begin: /\/\*/,
- captures: {0 => {name: "punctuation.definition.comment.php"}},
- end: "\\*/",
- name: "comment.block.php"}]},
- {match:
- /(?i)\b(?<_1>real|double|float|int(?<_2>eger)?|bool(?<_3>ean)?|string|class|clone|var|function|interface|parent|self|object)\b/,
- name: "storage.type.php"},
- {match:
- /(?i)\b(?<_1>global|abstract|const|extends|implements|final|p(?<_2>r(?<_3>ivate|otected)|ublic)|static)\b/,
- name: "storage.modifier.php"},
- {include: "#object"},
- {captures:
- {1 => {name: "keyword.operator.class.php"},
- 2 => {name: "meta.function-call.static.php"},
- 3 => {name: "variable.other.class.php"},
- 4 => {name: "punctuation.definition.variable.php"},
- 5 => {name: "constant.other.class.php"}},
- match:
- /(?x)(?<_1>::)
- (?:
- (?<_2>[A-Za-z_][A-Za-z_0-9]*)\s*\(
- |
- (?<_3>(?<_4>\$+)[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)
- |
- (?<_5>[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)
- )?/n},
- {include: "#support"},
- {begin: /(?<_1><<<)\s*(?<_2>[a-zA-Z_]+[a-zA-Z0-9_]*)/,
- beginCaptures:
- {1 => {name: "punctuation.definition.string.php"},
- 2 => {name: "keyword.operator.heredoc.php"}},
- end: "^(\\2)(;?)$",
- endCaptures:
- {1 => {name: "keyword.operator.heredoc.php"},
- 2 => {name: "punctuation.definition.string.php"}},
- name: "string.unquoted.heredoc.php",
- patterns: [{include: "#interpolation"}]},
- {match: /=>/, name: "keyword.operator.key.php"},
- {match: /&(?=\s*(?<_1>\$|new|[A-Za-z_][A-Za-z_0-9]+(?=\s*\()))/,
- name: "storage.modifier.reference.php"},
- {match: /;/, name: "punctuation.terminator.expression.php"},
- {match: /(?<_1>@)/, name: "keyword.operator.error-control.php"},
- {match: /(?<_1>\-\-|\+\+)/,
- name: "keyword.operator.increment-decrement.php"},
- {match: /(?<_1>\-|\+|\*|\/|%)/,
- name: "keyword.operator.arithmetic.php"},
- {match: /(?i)(?<_1>!|&&|\|\|)|\b(?<_2>and|or|xor|as)\b/,
- name: "keyword.operator.logical.php"},
- {match: /<<|>>|~|\^|&|\|/, name: "keyword.operator.bitwise.php"},
- {match: /(?<_1>===|==|!==|!=|<=|>=|<>|<|>)/,
- name: "keyword.operator.comparison.php"},
- {match: /(?<_1>\.=|\.)/, name: "keyword.operator.string.php"},
- {match: /=/, name: "keyword.operator.assignment.php"},
- {captures:
- {1 => {name: "keyword.operator.type.php"},
- 2 => {name: "support.class.php"}},
- match: /(?i)\b(?<_1>instanceof)\b(?:\s+(?<_2>\w+))?/},
- {include: "#numbers"},
- {include: "#strings"},
- {include: "#string-backtick"},
- {include: "#function-call"},
- {include: "#variables"},
- {captures:
- {1 => {name: "keyword.operator.php"},
- 2 => {name: "variable.other.property.php"}},
- match:
- /(?<=[a-zA-Z0-9_\x7f-\xff])(?<_1>->)(?<_2>[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*?)\b/n},
- {include: "#instantiation"},
- {include: "#constants"}]},
- numbers:
- {match:
- /\b(?<_1>(?<_2>0(?<_3>x|X)[0-9a-fA-F]*)|(?<_4>(?<_5>[0-9]+\.?[0-9]*)|(?<_6>\.[0-9]+))(?<_7>(?<_8>e|E)(?<_9>\+|-)?[0-9]+)?)\b/,
- name: "constant.numeric.php"},
- object:
- {captures:
- {1 => {name: "keyword.operator.class.php"},
- 2 => {name: "meta.function-call.object.php"},
- 3 => {name: "variable.other.property.php"},
- 4 => {name: "punctuation.definition.variable.php"}},
- match:
- /(?x)(?<_1>->)
- (?:
- (?<_2>[A-Za-z_][A-Za-z_0-9]*)\s*\(
- |
- (?<_3>(?<_4>\$+)?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)
- )?/n},
- :"parameter-default-types" =>
- {patterns:
- [{include: "#strings"},
- {include: "#numbers"},
- {include: "#string-backtick"},
- {include: "#variables"},
- {match: /=>/, name: "keyword.operator.key.php"},
- {match: /=/, name: "keyword.operator.assignment.php"},
- {match: /&(?=\s*\$)/, name: "storage.modifier.reference.php"},
- {begin: /(?<_1>array)\s*(?<_2>\()/,
- beginCaptures:
- {1 => {name: "support.function.construct.php"},
- 2 => {name: "punctuation.definition.array.begin.php"}},
- end: "\\)",
- endCaptures: {0 => {name: "punctuation.definition.array.end.php"}},
- name: "meta.array.php",
- patterns: [{include: "#parameter-default-types"}]},
- {include: "#instantiation"},
- {include: "#constants"}]},
- php_doc:
- {patterns:
- [{comment:
- "PHPDocumentor only recognises lines with an asterisk as the first non-whitespaces character",
- match: /^(?!\s*\*).*$\n?/,
- name: "invalid.illegal.missing-asterisk.phpdoc.php"},
- {captures:
- {1 => {name: "keyword.other.phpdoc.php"},
- 3 => {name: "storage.modifier.php"},
- 4 => {name: "invalid.illegal.wrong-access-type.phpdoc.php"}},
- match:
- /^\s*\*\s*(?<_1>@access)\s+(?<_2>(?<_3>public|private|protected)|(?<_4>.+))\s*$/},
- {match:
- /(?<_1>(?<_2>https?|s?ftp|ftps|file|smb|afp|nfs|(?<_3>x-)?man|gopher|txmt):\/\/|mailto:)[-:@a-zA-Z0-9_.~%+\/?=&#]+(?<![.?:])/,
- name: "markup.underline.link.php"},
- {captures:
- {1 => {name: "keyword.other.phpdoc.php"},
- 2 => {name: "markup.underline.link.php"}},
- match: /(?<_1>@xlink)\s+(?<_2>.+)\s*$/},
- {match:
- /\@(?<_1>a(?<_2>bstract|uthor)|c(?<_3>ategory|opyright)|example|global|internal|li(?<_4>cense|nk)|pa(?<_5>ckage|ram)|return|s(?<_6>ee|ince|tatic|ubpackage)|t(?<_7>hrows|odo)|v(?<_8>ar|ersion)|uses|deprecated|final)\b/,
- name: "keyword.other.phpdoc.php"},
- {captures: {1 => {name: "keyword.other.phpdoc.php"}},
- match: /\{(?<_1>@(?<_2>link)).+?\}/,
- name: "meta.tag.inline.phpdoc.php"}]},
- :"regex-double-quoted" =>
- {begin: /(?x)"\/ (?= (?<_1>\\.|[^"\/])++\/[imsxeADSUXu]*" )/,
- beginCaptures: {0 => {name: "punctuation.definition.string.begin.php"}},
- end: "(/)([imsxeADSUXu]*)(\")",
- endCaptures: {0 => {name: "punctuation.definition.string.end.php"}},
- name: "string.regexp.double-quoted.php",
- patterns:
- [{comment:
- "Escaped from the regexp – there can also be 2 backslashes (since 1 will escape the first)",
- match: /(?<_1>\\){1,2}[.$^\[\]{}]/,
- name: "constant.character.escape.regex.php"},
- {include: "#interpolation"},
- {captures:
- {1 => {name: "punctuation.definition.arbitrary-repitition.php"},
- 3 => {name: "punctuation.definition.arbitrary-repitition.php"}},
- match: /(?<_1>\{)\d+(?<_2>,\d+)?(?<_3>\})/,
- name: "string.regexp.arbitrary-repitition.php"},
- {begin: /\[(?:\^?\])?/,
- captures: {0 => {name: "punctuation.definition.character-class.php"}},
- end: "\\]",
- name: "string.regexp.character-class.php",
- patterns: [{include: "#interpolation"}]},
- {match: /[$^+*]/, name: "keyword.operator.regexp.php"}]},
- :"regex-single-quoted" =>
- {begin: /(?x)'\/ (?= (?<_1>\\.|[^'\/])++\/[imsxeADSUXu]*' )/,
- beginCaptures: {0 => {name: "punctuation.definition.string.begin.php"}},
- end: "(/)([imsxeADSUXu]*)(')",
- endCaptures: {0 => {name: "punctuation.definition.string.end.php"}},
- name: "string.regexp.single-quoted.php",
- patterns:
- [{captures:
- {1 => {name: "punctuation.definition.arbitrary-repitition.php"},
- 3 => {name: "punctuation.definition.arbitrary-repitition.php"}},
- match: /(?<_1>\{)\d+(?<_2>,\d+)?(?<_3>\})/,
- name: "string.regexp.arbitrary-repitition.php"},
- {comment:
- "Escaped from the regexp – there can also be 2 backslashes (since 1 will escape the first)",
- match: /(?<_1>\\){1,2}[.$^\[\]{}]/,
- name: "constant.character.escape.regex.php"},
- {comment:
- "Escaped from the PHP string – there can also be 2 backslashes (since 1 will escape the first)",
- match: /\\{1,2}[\\']/,
- name: "constant.character.escape.php"},
- {begin: /\[(?:\^?\])?/,
- captures: {0 => {name: "punctuation.definition.character-class.php"}},
- end: "\\]",
- name: "string.regexp.character-class.php",
- patterns:
- [{match: /\\[\\'\[\]]/, name: "constant.character.escape.php"}]},
- {match: /[$^+*]/, name: "keyword.operator.regexp.php"}]},
- :"sql-string-double-quoted" =>
- {begin:
- /"\s*(?=(?<_1>SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)\b)/,
- beginCaptures: {0 => {name: "punctuation.definition.string.begin.php"}},
- contentName: "source.sql.embedded.php",
- end: "\"",
- endCaptures: {0 => {name: "punctuation.definition.string.end.php"}},
- name: "string.quoted.double.sql.php",
- patterns:
- [{match: /#(?<_1>\\"|[^"])*(?="|$\n?)/,
- name: "comment.line.number-sign.sql"},
- {match: /--(?<_1>\\"|[^"])*(?="|$\n?)/,
- name: "comment.line.double-dash.sql"},
- {begin: /'(?=[^']*?")/,
- comment:
- "Unclosed strings must be captured to avoid them eating the remainder of the PHP script\n\t\t\t\t\tSample case: $sql = \"SELECT * FROM bar WHERE foo = '\" . $variable . \"'\"",
- end: "(?=\")",
- name: "string.quoted.single.unclosed.sql",
- patterns: [{match: /\\[\\']/, name: "constant.character.escape.php"}]},
- {begin: /`(?=[^`]*?")/,
- comment:
- "Unclosed strings must be captured to avoid them eating the remainder of the PHP script\n\t\t\t\t\tSample case: $sql = \"SELECT * FROM bar WHERE foo = '\" . $variable . \"'\"",
- end: "(?=\")",
- name: "string.quoted.other.backtick.unclosed.sql",
- patterns: [{match: /\\[\\']/, name: "constant.character.escape.php"}]},
- {begin: /\\"(?!(?<_1>[^\\"]|\\[^"])*\\")(?=(?<_2>\\[^"]|.)*?")/,
- comment:
- "Unclosed strings must be captured to avoid them eating the remainder of the PHP script\n\t\t\t\t\tSample case: $sql = \"SELECT * FROM bar WHERE foo = '\" . $variable . \"'\"",
- end: "(?=\")",
- name: "string.quoted.double.unclosed.sql",
- patterns: [{match: /\\[\\']/, name: "constant.character.escape.php"}]},
- {begin: /\\"/,
- captures: {0 => {name: "constant.character.escape.php"}},
- end: "\\\\\"",
- name: "string.quoted.double.sql",
- patterns: [{include: "#interpolation"}]},
- {begin: /`/,
- end: "`",
- name: "string.quoted.other.backtick.sql",
- patterns: [{include: "#interpolation"}]},
- {begin: /'/,
- end: "'",
- name: "string.quoted.single.sql",
- patterns: [{include: "#interpolation"}]},
- {match: /\\./, name: "constant.character.escape.php"},
- {include: "#interpolation"},
- {include: "source.sql"}]},
- :"sql-string-single-quoted" =>
- {begin:
- /'\s*(?=(?<_1>SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)\b)/,
- beginCaptures: {0 => {name: "punctuation.definition.string.begin.php"}},
- contentName: "source.sql.embedded.php",
- end: "'",
- endCaptures: {0 => {name: "punctuation.definition.string.end.php"}},
- name: "string.quoted.single.sql.php",
- patterns:
- [{match: /#(?<_1>\\'|[^'])*(?='|$\n?)/,
- name: "comment.line.number-sign.sql"},
- {match: /--(?<_1>\\'|[^'])*(?='|$\n?)/,
- name: "comment.line.double-dash.sql"},
- {begin: /\\'(?!(?<_1>[^\\']|\\[^'])*\\')(?=(?<_2>\\[^']|.)*?')/,
- comment:
- "Unclosed strings must be captured to avoid them eating the remainder of the PHP script\n\t\t\t\t\tSample case: $sql = \"SELECT * FROM bar WHERE foo = '\" . $variable . \"'\"",
- end: "(?=')",
- name: "string.quoted.single.unclosed.sql",
- patterns: [{match: /\\[\\']/, name: "constant.character.escape.php"}]},
- {begin: /`(?=[^`]*?')/,
- comment:
- "Unclosed strings must be captured to avoid them eating the remainder of the PHP script\n\t\t\t\t\tSample case: $sql = \"SELECT * FROM bar WHERE foo = '\" . $variable . \"'\"",
- end: "(?=')",
- name: "string.quoted.other.backtick.unclosed.sql",
- patterns: [{match: /\\[\\']/, name: "constant.character.escape.php"}]},
- {begin: /"(?=[^"]*?')/,
- comment:
- "Unclosed strings must be captured to avoid them eating the remainder of the PHP script\n\t\t\t\t\tSample case: $sql = \"SELECT * FROM bar WHERE foo = '\" . $variable . \"'\"",
- end: "(?=')",
- name: "string.quoted.double.unclosed.sql",
- patterns: [{match: /\\[\\']/, name: "constant.character.escape.php"}]},
- {begin: /\\'/,
- captures: {0 => {name: "constant.character.escape.php"}},
- end: "\\\\'",
- name: "string.quoted.single.sql"},
- {match: /\\[\\']/, name: "constant.character.escape.php"},
- {include: "source.sql"}]},
- :"string-backtick" =>
- {begin: /`/,
- beginCaptures: {0 => {name: "punctuation.definition.string.begin.php"}},
- end: "`",
- endCaptures: {0 => {name: "punctuation.definition.string.end.php"}},
- name: "string.interpolated.php",
- patterns:
- [{match: /\\./, name: "constant.character.escape.php"},
- {include: "#interpolation"}]},
- :"string-double-quoted" =>
- {begin: /"/,
- beginCaptures: {0 => {name: "punctuation.definition.string.begin.php"}},
- comment:
- "This contentName is just to allow the usage of “select scope” to select the string contents first, then the string with quotes",
- contentName: "meta.string-contents.quoted.double.php",
- end: "\"",
- endCaptures: {0 => {name: "punctuation.definition.string.end.php"}},
- name: "string.quoted.double.php",
- patterns: [{include: "#interpolation"}]},
- :"string-single-quoted" =>
- {begin: /'/,
- beginCaptures: {0 => {name: "punctuation.definition.string.begin.php"}},
- contentName: "meta.string-contents.quoted.single.php",
- end: "'",
- endCaptures: {0 => {name: "punctuation.definition.string.end.php"}},
- name: "string.quoted.single.php",
- patterns: [{match: /\\[\\']/, name: "constant.character.escape.php"}]},
- strings:
- {patterns:
- [{include: "#regex-double-quoted"},
- {include: "#sql-string-double-quoted"},
- {include: "#string-double-quoted"},
- {include: "#regex-single-quoted"},
- {include: "#sql-string-single-quoted"},
- {include: "#string-single-quoted"}]},
- support:
- {patterns:
- [{begin: /(?<_1>array)(?<_2>\()/,
- beginCaptures:
- {1 => {name: "support.function.construct.php"},
- 2 => {name: "punctuation.definition.array.begin.php"}},
- end: "\\)",
- endCaptures: {0 => {name: "punctuation.definition.array.end.php"}},
- name: "meta.array.php",
- patterns: [{include: "#language"}]},
- {match:
- /(?i)\b(?<_1>s(?<_2>huffle|ort)|n(?<_3>ext|at(?<_4>sort|casesort))|c(?<_5>o(?<_6>unt|mpact)|urrent)|in_array|u(?<_7>sort|ksort|asort)|prev|e(?<_8>nd|xtract)|k(?<_9>sort|ey|rsort)|a(?<_10>sort|r(?<_11>sort|ray_(?<_12>s(?<_13>hift|um|plice|earch|lice)|c(?<_14>h(?<_15>unk|ange_key_case)|o(?<_16>unt_values|mbine))|intersect(?<_17>_(?<_18>u(?<_19>key|assoc)|key|assoc))?|diff(?<_20>_(?<_21>u(?<_22>key|assoc)|key|assoc))?|u(?<_23>n(?<_24>shift|ique)|intersect(?<_25>_(?<_26>uassoc|assoc))?|diff(?<_27>_(?<_28>uassoc|assoc))?)|p(?<_29>op|ush|ad|roduct)|values|key(?<_30>s|_exists)|f(?<_31>il(?<_32>ter|l(?<_33>_keys)?)|lip)|walk(?<_34>_recursive)?|r(?<_35>e(?<_36>duce|verse)|and)|m(?<_37>ultisort|erge(?<_38>_recursive)?|ap))))|r(?<_39>sort|eset|ange)|m(?<_40>in|ax))(?=\s*\()/,
- name: "support.function.array.php"},
- {match: /(?i)\bassert(?<_1>_options)?(?=\s*\()/,
- name: "support.function.assert.php"},
- {match: /(?i)\bdom_attr_is_id(?=\s*\()/,
- name: "support.function.attr.php"},
- {match: /(?i)\bbase64_(?<_1>decode|encode)(?=\s*\()/,
- name: "support.function.base64.php"},
- {match:
- /(?i)\b(?<_1>highlight_(?<_2>string|file)|s(?<_3>ys_getloadavg|et_(?<_4>include_path|magic_quotes_runtime)|leep)|c(?<_5>on(?<_6>stant|nection_(?<_7>status|aborted))|all_user_(?<_8>func(?<_9>_array)?|method(?<_10>_array)?))|time_(?<_11>sleep_until|nanosleep)|i(?<_12>s_uploaded_file|n(?<_13>i_(?<_14>set|restore|get(?<_15>_all)?)|et_(?<_16>ntop|pton))|p2long|gnore_user_abort|mport_request_variables)|u(?<_17>sleep|nregister_tick_function)|error_(?<_18>log|get_last)|p(?<_19>hp_strip_whitespace|utenv|arse_ini_file|rint_r)|flush|long2ip|re(?<_20>store_include_path|gister_(?<_21>shutdown_function|tick_function))|get(?<_22>servby(?<_23>name|port)|opt|_(?<_24>c(?<_25>urrent_user|fg_var)|include_path|magic_quotes_(?<_26>gpc|runtime))|protobyn(?<_27>umber|ame)|env)|move_uploaded_file)(?=\s*\()/,
- name: "support.function.basic_functions.php"},
- {match:
- /(?i)\bbc(?<_1>s(?<_2>cale|ub|qrt)|comp|div|pow(?<_3>mod)?|add|m(?<_4>od|ul))(?=\s*\()/,
- name: "support.function.bcmath.php"},
- {match:
- /(?i)\bbirdstep_(?<_1>c(?<_2>o(?<_3>nnect|mmit)|lose)|off_autocommit|exec|f(?<_4>ieldn(?<_5>um|ame)|etch|reeresult)|autocommit|r(?<_6>ollback|esult))(?=\s*\()/,
- name: "support.function.birdstep.php"},
- {match: /(?i)\bget_browser(?=\s*\()/,
- name: "support.function.browscap.php"},
- {match:
- /(?i)\b(?<_1>s(?<_2>tr(?<_3>nc(?<_4>asecmp|mp)|c(?<_5>asecmp|mp)|len)|et_e(?<_6>rror_handler|xception_handler))|c(?<_7>lass_exists|reate_function)|trigger_error|i(?<_8>s_(?<_9>subclass_of|a)|nterface_exists)|de(?<_10>fine(?<_11>d)?|bug_(?<_12>print_backtrace|backtrace))|zend_version|property_exists|e(?<_13>ach|rror_reporting|xtension_loaded)|func(?<_14>tion_exists|_(?<_15>num_args|get_arg(?<_16>s)?))|leak|restore_e(?<_17>rror_handler|xception_handler)|get_(?<_18>class(?<_19>_(?<_20>vars|methods))?|included_files|de(?<_21>clared_(?<_22>classes|interfaces)|fined_(?<_23>constants|vars|functions))|object_vars|extension_funcs|parent_class|loaded_extensions|resource_type)|method_exists)(?=\s*\()/,
- name: "support.function.builtin_functions.php"},
- {match:
- /(?i)\bbz(?<_1>compress|decompress|open|err(?<_2>str|no|or)|read)(?=\s*\()/,
- name: "support.function.bz2.php"},
- {match: /(?i)\b(?<_1>jdtounix|unixtojd)(?=\s*\()/,
- name: "support.function.cal_unix.php"},
- {match:
- /(?i)\b(?<_1>cal_(?<_2>to_jd|info|days_in_month|from_jd)|j(?<_3>d(?<_4>to(?<_5>j(?<_6>ulian|ewish)|french|gregorian)|dayofweek|monthname)|uliantojd|ewishtojd)|frenchtojd|gregoriantojd)(?=\s*\()/,
- name: "support.function.calendar.php"},
- {match:
- /(?i)\bdom_characterdata_(?<_1>substring_data|insert_data|delete_data|append_data|replace_data)(?=\s*\()/,
- name: "support.function.characterdata.php"},
- {match:
- /(?i)\bcom_(?<_1>create_guid|print_typeinfo|event_sink|load_typelib|get_active_object|message_pump)(?=\s*\()/,
- name: "support.function.com_com.php"},
- {match:
- /(?i)\bvariant_(?<_1>s(?<_2>ub|et(?<_3>_type)?)|n(?<_4>ot|eg)|c(?<_5>a(?<_6>st|t)|mp)|i(?<_7>nt|div|mp)|or|d(?<_8>iv|ate_(?<_9>to_timestamp|from_timestamp))|pow|eqv|fix|a(?<_10>nd|dd|bs)|get_type|round|xor|m(?<_11>od|ul))(?=\s*\()/,
- name: "support.function.com_variant.php"},
- {match: /(?i)\bcrc32(?=\s*\()/, name: "support.function.crc32.php"},
- {match: /(?i)\bcrypt(?=\s*\()/, name: "support.function.crypt.php"},
- {match:
- /(?i)\bctype_(?<_1>space|cntrl|digit|upper|p(?<_2>unct|rint)|lower|al(?<_3>num|pha)|graph|xdigit)(?=\s*\()/,
- name: "support.function.ctype.php"},
- {match: /(?i)\bconvert_cyr_string(?=\s*\()/,
- name: "support.function.cyr_convert.php"},
- {match: /(?i)\bstrptime(?=\s*\()/,
- name: "support.function.datetime.php"},
- {match:
- /(?i)\bdba_(?<_1>handlers|sync|nextkey|close|insert|delete|op(?<_2>timize|en)|exists|popen|key_split|f(?<_3>irstkey|etch)|list|replace)(?=\s*\()/,
- name: "support.function.dba.php"},
- {match:
- /(?i)\bdbase_(?<_1>num(?<_2>fields|records)|c(?<_3>lose|reate)|delete_record|open|pack|add_record|get_(?<_4>header_info|record(?<_5>_with_names)?)|replace_record)(?=\s*\()/,
- name: "support.function.dbase.php"},
- {match:
- /(?i)\b(?<_1>scandir|c(?<_2>h(?<_3>dir|root)|losedir)|dir|opendir|re(?<_4>addir|winddir)|g(?<_5>etcwd|lob))(?=\s*\()/,
- name: "support.function.dir.php"},
- {match: /(?i)\bdl(?=\s*\()/, name: "support.function.dl.php"},
- {match:
- /(?i)\b(?<_1>dns_(?<_2>check_record|get_(?<_3>record|mx))|gethostby(?<_4>name(?<_5>l)?|addr))(?=\s*\()/,
- name: "support.function.dns.php"},
- {match:
- /(?i)\bdom_document_(?<_1>s(?<_2>chema_validate(?<_3>_file)?|ave(?<_4>_html(?<_5>_file)?|xml)?)|normalize_document|create_(?<_6>c(?<_7>datasection|omment)|text_node|document_fragment|processing_instruction|e(?<_8>ntity_reference|lement(?<_9>_ns)?)|attribute(?<_10>_ns)?)|import_node|validate|load(?<_11>_html(?<_12>_file)?|xml)?|adopt_node|re(?<_13>name_node|laxNG_validate_(?<_14>file|xml))|get_element(?<_15>s_by_tag_name(?<_16>_ns)?|_by_id)|xinclude)(?=\s*\()/,
- name: "support.function.document.php"},
- {match:
- /(?i)\bdom_domconfiguration_(?<_1>set_parameter|can_set_parameter|get_parameter)(?=\s*\()/,
- name: "support.function.domconfiguration.php"},
- {match: /(?i)\bdom_domerrorhandler_handle_error(?=\s*\()/,
- name: "support.function.domerrorhandler.php"},
- {match:
- /(?i)\bdom_domimplementation_(?<_1>has_feature|create_document(?<_2>_type)?|get_feature)(?=\s*\()/,
- name: "support.function.domimplementation.php"},
- {match: /(?i)\bdom_domimplementationlist_item(?=\s*\()/,
- name: "support.function.domimplementationlist.php"},
- {match:
- /(?i)\bdom_domimplementationsource_get_domimplementation(?<_1>s)?(?=\s*\()/,
- name: "support.function.domimplementationsource.php"},
- {match: /(?i)\bdom_domstringlist_item(?=\s*\()/,
- name: "support.function.domstringlist.php"},
- {match: /(?i)\beaster_da(?<_1>ys|te)(?=\s*\()/,
- name: "support.function.easter.php"},
- {match:
- /(?i)\bdom_element_(?<_1>has_attribute(?<_2>_ns)?|set_(?<_3>id_attribute(?<_4>_n(?<_5>s|ode))?|attribute(?<_6>_n(?<_7>s|ode(?<_8>_ns)?))?)|remove_attribute(?<_9>_n(?<_10>s|ode))?|get_(?<_11>elements_by_tag_name(?<_12>_ns)?|attribute(?<_13>_n(?<_14>s|ode(?<_15>_ns)?))?))(?=\s*\()/,
- name: "support.function.element.php"},
- {match:
- /(?i)\b(?<_1>s(?<_2>hell_exec|ystem)|p(?<_3>assthru|roc_nice)|e(?<_4>scapeshell(?<_5>cmd|arg)|xec))(?=\s*\()/,
- name: "support.function.exec.php"},
- {match:
- /(?i)\bexif_(?<_1>imagetype|t(?<_2>humbnail|agname)|read_data)(?=\s*\()/,
- name: "support.function.exif.php"},
- {match:
- /(?i)\bfdf_(?<_1>header|s(?<_2>et_(?<_3>s(?<_4>tatus|ubmit_form_action)|target_frame|o(?<_5>n_import_javascript|pt)|javascript_action|encoding|v(?<_6>ersion|alue)|f(?<_7>ile|lags)|ap)|ave(?<_8>_string)?)|next_field_name|c(?<_9>lose|reate)|open(?<_10>_string)?|e(?<_11>num_values|rr(?<_12>no|or))|add_(?<_13>template|doc_javascript)|remove_item|get_(?<_14>status|opt|encoding|v(?<_15>ersion|alue)|f(?<_16>ile|lags)|a(?<_17>ttachment|p)))(?=\s*\()/,
- name: "support.function.fdf.php"},
- {match:
- /(?i)\b(?<_1>sys_get_temp_dir|copy|t(?<_2>empnam|mpfile)|u(?<_3>nlink|mask)|p(?<_4>close|open)|f(?<_5>s(?<_6>canf|tat|eek)|nmatch|close|t(?<_7>ell|runcate)|ile(?<_8>_(?<_9>put_contents|get_contents))?|open|p(?<_10>utcsv|assthru)|eof|flush|write|lock|read|get(?<_11>s(?<_12>s)?|c(?<_13>sv)?))|r(?<_14>e(?<_15>name|a(?<_16>dfile|lpath)|wind)|mdir)|get_meta_tags|mkdir)(?=\s*\()/,
- name: "support.function.file.php"},
- {match:
- /(?i)\b(?<_1>stat|c(?<_2>h(?<_3>own|grp|mod)|learstatcache)|is_(?<_4>dir|executable|file|link|writable|readable)|touch|disk_(?<_5>total_space|free_space)|file(?<_6>size|ctime|type|inode|owner|_exists|perms|atime|group|mtime)|l(?<_7>stat|chgrp))(?=\s*\()/,
- name: "support.function.filestat.php"},
- {match:
- /(?i)\bfilter_(?<_1>has_var|input(?<_2>_array)?|var(?<_3>_array)?)(?=\s*\()/,
- name: "support.function.filter.php"},
- {match:
- /(?i)\b(?<_1>sprintf|printf|v(?<_2>sprintf|printf|fprintf)|fprintf)(?=\s*\()/,
- name: "support.function.formatted_print.php"},
- {match: /(?i)\b(?<_1>pfsockopen|fsockopen)(?=\s*\()/,
- name: "support.function.fsock.php"},
- {match: /(?i)\bftok(?=\s*\()/, name: "support.function.ftok.php"},
- {match:
- /(?i)\b(?<_1>image(?<_2>s(?<_3>y|tring(?<_4>up)?|et(?<_5>style|t(?<_6>hickness|ile)|pixel|brush)|avealpha|x)|c(?<_7>har(?<_8>up)?|o(?<_9>nvolution|py(?<_10>res(?<_11>ized|ampled)|merge(?<_12>gray)?)?|lor(?<_13>s(?<_14>total|et|forindex)|closest(?<_15>hwb|alpha)?|transparent|deallocate|exact(?<_16>alpha)?|a(?<_17>t|llocate(?<_18>alpha)?)|resolve(?<_19>alpha)?|match))|reate(?<_20>truecolor|from(?<_21>string|jpeg|png|wbmp|g(?<_22>if|d(?<_23>2(?<_24>part)?)?)|x(?<_25>pm|bm)))?)|2wbmp|t(?<_26>ypes|tf(?<_27>text|bbox)|ruecolortopalette)|i(?<_28>struecolor|nterlace)|d(?<_29>estroy|ashedline)|jpeg|ellipse|p(?<_30>s(?<_31>slantfont|copyfont|text|e(?<_32>ncodefont|xtendfont)|freefont|loadfont|bbox)|ng|olygon|alettecopy)|f(?<_33>t(?<_34>text|bbox)|il(?<_35>ter|l(?<_36>toborder|ed(?<_37>polygon|ellipse|arc|rectangle))?)|ont(?<_38>height|width))|wbmp|a(?<_39>ntialias|lphablending|rc)|l(?<_40>ine|oadfont|ayereffect)|r(?<_41>otate|ectangle)|g(?<_42>if|d(?<_43>2)?|ammacorrect|rab(?<_44>screen|window))|xbm)|jpeg2wbmp|png2wbmp|gd_info)(?=\s*\()/,
- name: "support.function.gd.php"},
- {match:
- /(?i)\b(?<_1>ngettext|textdomain|d(?<_2>ngettext|c(?<_3>ngettext|gettext)|gettext)|gettext|bind(?<_4>textdomain|_textdomain_codeset))(?=\s*\()/,
- name: "support.function.gettext.php"},
- {match:
- /(?i)\bgmp_(?<_1>hamdist|s(?<_2>can(?<_3>1|0)|ign|trval|ub|etbit|qrt(?<_4>rem)?)|c(?<_5>om|lrbit|mp)|ne(?<_6>g|xtprime)|in(?<_7>tval|it|vert)|or|div(?<_8>_(?<_9>q(?<_10>r)?|r)|exact)|jacobi|p(?<_11>o(?<_12>pcount|w(?<_13>m)?)|erfect_square|rob_prime)|fact|legendre|a(?<_14>nd|dd|bs)|random|gcd(?<_15>ext)?|xor|m(?<_16>od|ul))(?=\s*\()/,
- name: "support.function.gmp.php"},
- {match:
- /(?i)\bhash(?<_1>_(?<_2>hmac(?<_3>_file)?|init|update(?<_4>_(?<_5>stream|file))?|fi(?<_6>nal|le)|algos))?(?=\s*\()/,
- name: "support.function.hash.php"},
- {match: /(?i)\bmd5(?<_1>_file)?(?=\s*\()/,
- name: "support.function.hash_md.php"},
- {match: /(?i)\bsha1(?<_1>_file)?(?=\s*\()/,
- name: "support.function.hash_sha.php"},
- {match:
- /(?i)\b(?<_1>set(?<_2>cookie|rawcookie)|header(?<_3>s_(?<_4>sent|list))?)(?=\s*\()/,
- name: "support.function.head.php"},
- {match:
- /(?i)\b(?<_1>html(?<_2>specialchars(?<_3>_decode)?|_entity_decode|entities)|get_html_translation_table)(?=\s*\()/,
- name: "support.function.html.php"},
- {match: /(?i)\bhttp_build_query(?=\s*\()/,
- name: "support.function.http.php"},
- {match:
- /(?i)\bibase_blob_(?<_1>c(?<_2>ancel|lose|reate)|i(?<_3>nfo|mport)|open|echo|add|get)(?=\s*\()/,
- name: "support.function.ibase_blobs.php"},
- {match:
- /(?i)\bibase_(?<_1>set_event_handler|free_event_handler|wait_event)(?=\s*\()/,
- name: "support.function.ibase_events.php"},
- {match:
- /(?i)\bibase_(?<_1>n(?<_2>um_(?<_3>params|fields|rows)|ame_result)|execute|p(?<_4>aram_info|repare)|f(?<_5>ield_info|etch_(?<_6>object|assoc|row)|ree_(?<_7>query|result))|query|affected_rows)(?=\s*\()/,
- name: "support.function.ibase_query.php"},
- {match:
- /(?i)\bibase_(?<_1>serv(?<_2>ice_(?<_3>detach|attach)|er_info)|d(?<_4>elete_user|b_info)|add_user|restore|backup|m(?<_5>odify_user|aintain_db))(?=\s*\()/,
- name: "support.function.ibase_service.php"},
- {match:
- /(?i)\b(?<_1>iconv(?<_2>_(?<_3>s(?<_4>tr(?<_5>pos|len|rpos)|ubstr|et_encoding)|get_encoding|mime_(?<_6>decode(?<_7>_headers)?|encode)))?|ob_iconv_handler)(?=\s*\()/,
- name: "support.function.iconv.php"},
- {match:
- /(?i)\b(?<_1>image_type_to_(?<_2>extension|mime_type)|getimagesize)(?=\s*\()/,
- name: "support.function.image.php"},
- {match:
- /(?i)\b(?<_1>zend_logo_guid|php(?<_2>credits|info|_(?<_3>sapi_name|ini_scanned_files|uname|egg_logo_guid|logo_guid|real_logo_guid)|version))(?=\s*\()/,
- name: "support.function.info.php"},
- {match:
- /(?i)\bibase_(?<_1>c(?<_2>o(?<_3>nnect|mmit(?<_4>_ret)?)|lose)|trans|drop_db|pconnect|err(?<_5>code|msg)|gen_id|rollback(?<_6>_ret)?)(?=\s*\()/,
- name: "support.function.interbase.php"},
- {match:
- /(?i)\bcurl_(?<_1>setopt(?<_2>_array)?|c(?<_3>opy_handle|lose)|init|e(?<_4>rr(?<_5>no|or)|xec)|version|getinfo)(?=\s*\()/,
- name: "support.function.interface.php"},
- {match: /(?i)\biptc(?<_1>parse|embed)(?=\s*\()/,
- name: "support.function.iptc.php"},
- {match: /(?i)\bjson_(?<_1>decode|encode)(?=\s*\()/,
- name: "support.function.json.php"},
- {match: /(?i)\blcg_value(?=\s*\()/, name: "support.function.lcg.php"},
- {match:
- /(?i)\bldap_(?<_1>s(?<_2>tart_tls|ort|e(?<_3>t_(?<_4>option|…
Large files files are truncated, but you can click here to view the full file