{ "comment": "TODO:\n\u2022 Try to improve parameters list syntax \u2013 scope numbers, \u2018=\u2019, \u2018,\u2019 and possibly be intelligent about entity ordering\n\u2022 Is meta.function-call the correct scope? I've added it to my theme but by default it's not highlighted", "firstLineMatch": "^#!.*(?)<)\t\t# 4 - Consecutive tags\n\t\t\t\t\t\t\t | <\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\\?(?i:php|=)?\n\t\t\t\t\t\t)\n\t\t\t\t\t\t\t(\\s*)\t\t\t\t# 5 - Loneliness\n\t\t\t\t\t\t((\\?)>)\t\t\t\t\t# 6 - Close Tag\n\t\t\t\t\t\t\t\t\t\t\t\t# 7 - Scope ? as scope.php\n\t\t\t\t\t)\n\t\t\t\t(\n\t\t\t\t\t\\1\t\t\t\t\t\t\t# Match nothing if there was no\n\t\t\t\t\t\t\t\t\t\t\t\t# leading whitespace...\n\t\t\t\t | (\\s*$\\n)?\t\t\t\t\t# or match trailing whitespace.\n\t\t\t\t)\n\t\t\t" }, { "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": "(((?<=\\?>)<)|<)\\?(?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(TRUE|FALSE|NULL|__(FILE|FUNCTION|CLASS|METHOD|LINE)__|ON|OFF|YES|NO|NL|BR|TAB)\\b", "name": "constant.language.php" }, { "match": "\\b(DEFAULT_INCLUDE_PATH|E_(ALL|COMPILE_(ERROR|WARNING)|CORE_(ERROR|WARNING)|(RECOVERABLE_)?ERROR|NOTICE|PARSE|STRICT|USER_(ERROR|NOTICE|WARNING)|WARNING)|PEAR_(EXTENSION_DIR|INSTALL_DIR)|PHP_(BINDIR|CONFIG_FILE_PATH|DATADIR|E(OL|XTENSION_DIR)|L(IBDIR|OCALSTATEDIR)|O(S|UTPUT_HANDLER_CONT|UTPUT_HANDLER_END|UTPUT_HANDLER_START)|SYSCONFDIR|VERSION))\\b", "name": "support.constant.core.php" }, { "match": "\\b(A(B(DAY_([1-7])|MON_([0-9]{1,2}))|LT_DIGITS|M_STR|SSERT_(ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(ASE_(LOWER|UPPER)|HAR_MAX|O(DESET|NNECTION_(ABORTED|NORMAL|TIMEOUT)|UNT_(NORMAL|RECURSIVE))|REDITS_(ALL|DOCS|FULLPAGE|GENERAL|GROUP|MODULES|QA|SAPI)|RNCYSTR|RYPT_(BLOWFISH|EXT_DES|MD5|SALT_LENGTH|STD_DES)|URRENCY_SYMBOL)|D(AY_([1-7])|ECIMAL_POINT|IRECTORY_SEPARATOR|_(FMT|T_FMT))|E(NT_(COMPAT|NOQUOTES|QUOTES)|RA(|_D_FMT|_D_T_FMT|_T_FMT|_YEAR)|XTR_(IF_EXISTS|OVERWRITE|PREFIX_(ALL|IF_EXISTS|INVALID|SAME)|SKIP))|FRAC_DIGITS|GROUPING|HTML_(ENTITIES|SPECIALCHARS)|IN(FO_(ALL|CONFIGURATION|CREDITS|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|I_(ALL|PERDIR|SYSTEM|USER)|T_(CURR_SYMBOL|FRAC_DIGITS))|L(C_(ALL|COLLATE|CTYPE|MESSAGES|MONETARY|NUMERIC|TIME)|O(CK_(EX|NB|SH|UN)|G_(ALERT|AUTH(|PRIV)|CONS|CRIT|CRON|DAEMON|DEBUG|EMERG|ERR|INFO|KERN|LOCAL([0-7])|LPR|MAIL|NDELAY|NEWS|NOTICE|NOWAIT|ODELAY|PERROR|PID|SYSLOG|USER|UUCP|WARNING)))|M(ON_([0-9]{1,2}|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|YSQL_(ASSOC|BOTH|NUM)|_(1_PI|2_(PI|SQRTPI)|E|L(N10|N2|OG(10E|2E))|PI(|_2|_4)|SQRT1_2|SQRT2))|N(EGATIVE_SIGN|O(EXPR|STR)|_(CS_PRECEDES|SEP_BY_SPACE|SIGN_POSN))|P(ATH(INFO_(BASENAME|DIRNAME|EXTENSION|FILENAME)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(CS_PRECEDES|SEP_BY_SPACE|SIGN_POSN))|RADIXCHAR|S(EEK_(CUR|END|SET)|ORT_(ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(BOTH|LEFT|RIGHT))|T(HOUS(ANDS_SEP|EP)|_(FMT(|_AMPM)))|YES(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]*", "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(new)\\s+(?:(\\$[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)|(\\w+))|(\\w+)(?=::)" }, "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)\n\t\t\t\t\t\t((\\$\\{)(?[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)(\\}))\n\t\t\t\t\t\t" }, { "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)\n\t\t\t\t\t\t((\\$)(?[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*))\n\t\t\t\t\t\t(?:\n\t\t\t\t\t\t\t(->)\n\t\t\t\t\t\t\t\t(?:\n\t\t\t\t\t\t\t\t\t(\\g)\n\t\t\t\t\t\t\t\t\t|\n\t\t\t\t\t\t\t\t\t(\\$\\g)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t|\n\t\t\t\t\t\t\t(\\[)\n\t\t\t\t\t\t\t\t(?:(\\d+)|((\\$)\\g)|(\\w+)|(.*?))\n\t\t\t\t\t\t\t(\\])\n\t\t\t\t\t\t)?\n\t\t\t\t\t\t" }, { "begin": "(?=(?(?#simple syntax)\\$(?[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)(?:\\[(?[a-zA-Z0-9_\\x7f-\\xff]+|\\$\\g)\\]|->\\g(\\(.*?\\))?)?|(?#simple syntax with braces)\\$\\{(?:\\g(?\\[(?:\\g|'(?:\\\\.|[^'\\\\])*'|\"(?:\\g|\\\\.|[^\"\\\\])*\")\\])?|\\g|\\$\\{\\g\\})\\}|(?#complex syntax)\\{(?\\$(?\\g(\\g*|\\(.*?\\))?)(?:->\\g)*|\\$\\g|\\$\\{\\g\\})\\}))\\{", "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*(HTML|XML|SQL|JAVASCRIPT|CSS)\\s*$)", "end": "(?!))", "name": "comment.line.double-slash.php" }, { "captures": { "1": { "name": "punctuation.definition.comment.php" } }, "match": "(#).*?($\\n?|(?=\\?>))", "name": "comment.line.number-sign.php" }, { "begin": "^(?i)\\s*(interface)\\s+([a-z0-9_]+)\\s*(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*(abstract|final)?\\s*(class)\\s+([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:(extends))\\s+([a-zA-Z0-9_]+)\\s*" }, { "begin": "(?i:(implements))\\s+([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*([a-zA-Z0-9_]+)\\s*" } ] } ] }, { "match": "\\b(break|c(ase|ontinue)|d(e(clare|fault)|ie|o)|e(lse(if)?|nd(declare|for(each)?|if|switch|while)|xit)|for(each)?|if|return|switch|use|while)\\b", "name": "keyword.control.php" }, { "begin": "(?i)\\b((?: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(catch)\\b\\s*\\(\\s*([A-Za-z_][A-Za-z_0-9]*)\\s*((\\$+)[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)\\s*\\)", "name": "meta.catch.php" }, { "match": "\\b(catch|try|throw|exception)\\b", "name": "keyword.control.exception.php" }, { "begin": "(?:^\\s*)((?:(?:final|abstract|public|private|protected|static)\\s+)*)(function)(?:\\s+|(\\s*&\\s*))(?:(__(?:call|(?:con|de)struct|get|(?:is|un)?set|tostring|clone|set_state|sleep|wakeup|autoload))|([a-zA-Z0-9_]+))\\s*(\\()", "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)\n\t\t\t\t\t\t\t\t\t\\s*(array) # Typehint\n\t\t\t\t\t\t\t\t\t\\s*(&)? \t\t\t\t\t# Reference\n\t\t\t\t\t\t\t\t\t\\s*((\\$+)[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*) # The variable name\n\t\t\t\t\t\t\t\t\t\\s*(=)\t# A default value\n\t\t\t\t\t\t\t\t\t\\s*(array)\\s*(\\()\n\t\t\t\t\t\t\t\t\t", "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)\n\t\t\t\t\t\t\t\t\t\\s*(array) # Typehint\n\t\t\t\t\t\t\t\t\t\\s*(&)? \t\t\t\t\t# Reference\n\t\t\t\t\t\t\t\t\t\\s*((\\$+)[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*) # The variable name\n\t\t\t\t\t\t\t\t\t(?:\n\t\t\t\t\t\t\t\t\t\t\\s*(=)\t# A default value\n\t\t\t\t\t\t\t\t\t\t\\s*(?i:\n\t\t\t\t\t\t\t\t\t\t\t(NULL)\n\t\t\t\t\t\t\t\t\t\t\t|\n\t\t\t\t\t\t\t\t\t\t\t(\\S.*?)\n\t\t\t\t\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t\t\t\\s*(?=,|\\)) # A closing parentheses (end of argument list) or a comma\n\t\t\t\t\t\t\t\t\t", "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)\n\t\t\t\t\t\t\t\t\t\\s*([A-Za-z_][A-Za-z_0-9]*) # Typehinted class name\n\t\t\t\t\t\t\t\t\t\\s*(&)? \t\t\t\t\t# Reference\n\t\t\t\t\t\t\t\t\t\\s*((\\$+)[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*) # The variable name\n\t\t\t\t\t\t\t\t\t(?:\n\t\t\t\t\t\t\t\t\t\t\\s*(=)\t# A default value\n\t\t\t\t\t\t\t\t\t\t\\s*(?i:\n\t\t\t\t\t\t\t\t\t\t\t(NULL)\n\t\t\t\t\t\t\t\t\t\t\t|\n\t\t\t\t\t\t\t\t\t\t\t(\\S.*?)\n\t\t\t\t\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t\t\t\\s*(?=,|\\)) # A closing parentheses (end of argument list) or a comma\n\t\t\t\t\t\t\t\t\t", "name": "meta.function.argument.typehinted.php" }, { "captures": { "1": { "name": "storage.modifier.php" }, "2": { "name": "variable.other.php" }, "3": { "name": "punctuation.definition.variable.php" } }, "match": "(\\s*&)?\\s*((\\$+)[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)\\s*(?=,|\\))", "name": "meta.function.argument.no-default.php" }, { "begin": "(\\s*&)?\\s*((\\$+)[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)(?:\\s*(=)\\s*)\\s*", "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(real|double|float|int(eger)?|bool(ean)?|string|class|clone|var|function|interface|parent|self|object)\\b", "name": "storage.type.php" }, { "match": "(?i)\\b(global|abstract|const|extends|implements|final|p(r(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)(::)\n (?:\n \t\t\t\t ([A-Za-z_][A-Za-z_0-9]*)\\s*\\(\n \t\t\t\t |\n \t\t\t\t ((\\$+)[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)\n \t\t\t\t |\n \t\t\t\t ([a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)\n \t\t\t\t)?" }, { "include": "#support" }, { "begin": "(<<<)\\s*([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*(\\$|new|[A-Za-z_][A-Za-z_0-9]+(?=\\s*\\()))", "name": "storage.modifier.reference.php" }, { "match": ";", "name": "punctuation.terminator.expression.php" }, { "match": "(@)", "name": "keyword.operator.error-control.php" }, { "match": "(\\-\\-|\\+\\+)", "name": "keyword.operator.increment-decrement.php" }, { "match": "(\\-|\\+|\\*|/|%)", "name": "keyword.operator.arithmetic.php" }, { "match": "(?i)(!|&&|\\|\\|)|\\b(and|or|xor|as)\\b", "name": "keyword.operator.logical.php" }, { "match": "<<|>>|~|\\^|&|\\|", "name": "keyword.operator.bitwise.php" }, { "match": "(===|==|!==|!=|<=|>=|<>|<|>)", "name": "keyword.operator.comparison.php" }, { "match": "(\\.=|\\.)", "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(instanceof)\\b(?:\\s+(\\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])(->)([a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*?)\\b" }, { "include": "#instantiation" }, { "include": "#constants" } ] }, "numbers": { "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[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)(->)\n \t\t\t\t(?:\n \t\t\t\t ([A-Za-z_][A-Za-z_0-9]*)\\s*\\(\n \t\t\t\t |\n \t\t\t\t ((\\$+)?[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)\n \t\t\t\t)?" }, "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": "(array)\\s*(\\()", "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*(@access)\\s+((public|private|protected)|(.+))\\s*$" }, { "match": "((https?|s?ftp|ftps|file|smb|afp|nfs|(x-)?man|gopher|txmt)://|mailto:)[-:@a-zA-Z0-9_.~%+/?=&#]+(?