textpow 1.3.1 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0676923b9eeab2e664e9a69a923fdeafdde5b4e7
4
+ data.tar.gz: 47b56152e7f614dceb394f36696b6bb8e249d878
5
+ SHA512:
6
+ metadata.gz: b718f22c9ebc1afa270c6772abfab4561521d1fe1849a29792ea77851d4a13fd151636aac5c039769fe4e8b7b56d728374cc3dabe4d16083287cfd04f88b12fe
7
+ data.tar.gz: 93de2fb45f6f6272822d44361c5bc16840583ce294f364f54b63385b8a0e60291a8a48d7d4261addc8e9317f0a1e3de3569a47d39fa22b1779262876dca43c5a
@@ -0,0 +1,1330 @@
1
+ ---
2
+ name: PHP
3
+ firstLineMatch: ^#!.*(?<!-)php[0-9]{0,1}\b
4
+ foldingStartMarker: (/\*|\{\s*$|<<<HTML)
5
+ foldingStopMarker: (\*/|^\s*\}|^HTML;)
6
+ patterns:
7
+ - captures:
8
+ '1':
9
+ name: punctuation.whitespace.embedded.leading.php
10
+ '2':
11
+ name: source.php.embedded.line.empty.html
12
+ '3':
13
+ name: punctuation.section.embedded.begin.php
14
+ '4':
15
+ name: meta.consecutive-tags.php
16
+ '5':
17
+ name: source.php
18
+ '6':
19
+ name: punctuation.section.embedded.end.php
20
+ '7':
21
+ name: source.php
22
+ '8':
23
+ name: punctuation.whitespace.embedded.trailing.php
24
+ comment: Matches empty tags.
25
+ match: ! "(?x)\n\t\t\t\t(^\\s*)?\t\t\t\t\t\t\t# 1 - Leading whitespace\n\t\t\t\t\t(\t\t\t\t\t\t\t#
26
+ 2 - meta.embedded.line.empty.php\n\t\t\t\t\t\t(\t\t\t\t\t\t# 3 - Open Tag\n\t\t\t\t\t\t\t(?:\n\t\t\t\t\t\t\t\t((?<=\\?>)<)\t\t#
27
+ 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#
28
+ 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#
29
+ 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#
30
+ 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
31
+ \ | (\\s*$\\n)?\t\t\t\t\t# or match trailing whitespace.\n\t\t\t\t)\n\t\t\t"
32
+ - begin: ^\s*(?=<\?)
33
+ beginCaptures:
34
+ '0':
35
+ name: punctuation.whitespace.embedded.leading.php
36
+ comment: Catches tags with preceeding whitespace.
37
+ end: (?<=\?>)(\s*$\n)?
38
+ endCaptures:
39
+ '0':
40
+ name: punctuation.whitespace.embedded.trailing.php
41
+ patterns:
42
+ - begin: <\?(?i:php|=)?
43
+ beginCaptures:
44
+ '0':
45
+ name: punctuation.section.embedded.begin.php
46
+ end: (\?)>
47
+ endCaptures:
48
+ '0':
49
+ name: punctuation.section.embedded.end.php
50
+ '1':
51
+ name: source.php
52
+ name: source.php.embedded.block.html
53
+ patterns:
54
+ - include: ! '#language'
55
+ - begin: (((?<=\?>)<)|<)\?(?i:php|=)?
56
+ beginCaptures:
57
+ '0':
58
+ name: punctuation.section.embedded.begin.php
59
+ '2':
60
+ name: meta.consecutive-tags.php
61
+ comment: Catches the remainder.
62
+ end: (\?)>
63
+ endCaptures:
64
+ '0':
65
+ name: punctuation.section.embedded.end.php
66
+ '1':
67
+ name: source.php
68
+ name: source.php.embedded.line.html
69
+ patterns:
70
+ - include: ! '#language'
71
+ repository:
72
+ class-builtin:
73
+ patterns:
74
+ - captures:
75
+ '1':
76
+ name: punctuation.separator.inheritance.php
77
+ match: (?i)(\\)?\b(st(dClass|reamWrapper)|R(RD(Graph|Creator|Updater)|untimeException|e(sourceBundle|cursive(RegexIterator|CachingIterator|TreeIterator|Iterator(Iterator)?|DirectoryIterator|FilterIterator|ArrayIterator)|flect(ion(Method|Class|Object|P(arameter|roperty)|Extension|Function(Abstract)?)?|or)|gexIterator)|angeException)|G(lobIterator|magick(Draw|Pixel)?)|X(ML(Reader|Writer)|SLTProcessor)|M(ongo(Regex|Grid(fsFile|FS(Cursor|File)?)|BinData|C(o(de|llection)|ursor)|Timestamp|I(nt(32|64)|d)|D(B(Ref)?|ate))?|ultipleIterator|e(ssageFormatter|mcache(d)?))|Bad(MethodCallException|FunctionCallException)|tidy(Node)?|S(impleXML(Iterator|Element)|oap(Server|Header|Client|Param|Var|Fault)|NMP|CA(_(SoapProxy|LocalProxy))?|p(hinxClient|l(M(inHeap|axHeap)|Bool|S(t(ack|ring)|ubject)|Heap|TempFileObject|Int|Ob(server|jectStorage)|DoublyLinkedList|PriorityQueue|Enum|Queue|F(i(le(Info|Object)|xedArray)|loat)))|e(ekableIterator|rializable)|DO_(Model_(ReflectionDataObject|Type|Property)|Sequence|D(ata(Object|Factory)|AS_(Relational|XML(_Document)?|Setting|ChangeSummary|Data(Object|Factory)))|Exception|List)|wish(Result(s)?|Search)?|VM(Model)?|QLite(Result|3(Result|Stmt)?|Database|Unbuffered)|AM(Message|Connection))|H(ttp(Re(sponse|quest(Pool)?)|Message|InflateStream|DeflateStream|QueryString)|aru(Image|Outline|D(oc|estination)|Page|Encoder|Font|Annotation))|N(o(RewindIterator|rmalizer)|umberFormatter)|C(o(untable|llator)|achingIterator)|T(okyoTyrant(Table|Query)?|ra(nsliterator|versable))|I(n(tlDateFormatter|validArgumentException|finiteIterator)|terator(Iterator|Aggregate)?|magick(Draw|Pixel(Iterator)?)?)|ZipArchive|O(CI-(Collection|Lob)|ut(erIterator|Of(RangeException|BoundsException))|verflowException)|D(irectoryIterator|om(XsltStylesheet|Node|Document(Type)?|ProcessingInstruction|Element|ainException|Attribute)|OM(XPath|N(ode(list)?|amedNodeMap)|C(haracterData|omment)|Text|Implementation|Document(Fragment)?|ProcessingInstruction|E(ntityReference|lement)|Attr)|ate(Time(Zone)?|Interval|Period))|Un(derflowException|expectedValueException)|finfo|P(har(Data|FileInfo)?|DO(Statement)?|arentIterator)|E(rrorException|xception|mptyIterator)|V8Js(Exception)?|KTaglib_(MPEG_(File|AudioProperties)|Tag|ID3v2_(Tag|Frame|AttachedPictureFrame))|Fil(terIterator|esystemIterator)|mysqli(_(stmt|driver|warning|result))?|L(imitIterator|o(cale|gicException)|engthException)|A(MQP(Connection|Exchange|Queue)|ppendIterator|PCIterator|rray(Iterator|Object|Access)))\b
78
+ name: support.class.builtin.php
79
+ class-name:
80
+ patterns:
81
+ - begin: (?i)(?=\\?[a-z_0-9]+\\)
82
+ end: (?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\])
83
+ endCaptures:
84
+ '1':
85
+ name: support.class.php
86
+ patterns:
87
+ - include: ! '#namespace'
88
+ - include: ! '#class-builtin'
89
+ - begin: (?=[\\a-zA-Z_])
90
+ end: (?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\])
91
+ endCaptures:
92
+ '1':
93
+ name: support.class.php
94
+ patterns:
95
+ - include: ! '#namespace'
96
+ comments:
97
+ patterns:
98
+ - begin: /\*\*(?:#@\+)?\s*$
99
+ captures:
100
+ '0':
101
+ name: punctuation.definition.comment.php
102
+ comment: ! "This now only highlights a docblock if the first line contains only
103
+ /**\n\t\t\t\t\t\t\t\t- this is to stop highlighting everything as invalid
104
+ when people do comment banners with /******** ...\n\t\t\t\t\t\t\t\t- Now matches
105
+ /**#@+ too - used for docblock templates: http://manual.phpdoc.org/HTMLframesConverter/default/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html#basics.docblocktemplate"
106
+ end: \*/
107
+ name: comment.block.documentation.phpdoc.php
108
+ patterns:
109
+ - include: ! '#php_doc'
110
+ - begin: /\*
111
+ captures:
112
+ '0':
113
+ name: punctuation.definition.comment.php
114
+ end: \*/
115
+ name: comment.block.php
116
+ - captures:
117
+ '1':
118
+ name: punctuation.definition.comment.php
119
+ match: (//).*?($\n?|(?=\?>))
120
+ name: comment.line.double-slash.php
121
+ - captures:
122
+ '1':
123
+ name: punctuation.definition.comment.php
124
+ match: (#).*?($\n?|(?=\?>))
125
+ name: comment.line.number-sign.php
126
+ constants:
127
+ patterns:
128
+ - begin: ! "(?xi)(?=\n\t\t\t (\n\t\t\t (\\\\[a-z_][a-z_0-9]*\\\\[a-z_][a-z_0-9\\\\]*)|\n\t\t\t
129
+ \ ([a-z_][a-z_0-9]*\\\\[a-z_][a-z_0-9\\\\]*)\n\t\t\t )\n\t\t\t
130
+ \ [^a-z_0-9\\\\])"
131
+ end: (?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\])
132
+ endCaptures:
133
+ '1':
134
+ name: constant.other.php
135
+ patterns:
136
+ - include: ! '#namespace'
137
+ - begin: (?=\\?[a-zA-Z_])
138
+ end: (?=[^\\a-zA-Z_])
139
+ patterns:
140
+ - match: (?i)\b(TRUE|FALSE|NULL|__(FILE|DIR|FUNCTION|CLASS|METHOD|LINE|NAMESPACE)__|ON|OFF|YES|NO|NL|BR|TAB)\b
141
+ name: constant.language.php
142
+ - captures:
143
+ '1':
144
+ name: punctuation.separator.inheritance.php
145
+ match: (\\)?\b(STD(IN|OUT|ERR)|ZEND_(THREAD_SAFE|DEBUG_BUILD)|DEFAULT_INCLUDE_PATH|P(HP_(R(OUND_HALF_(ODD|DOWN|UP|EVEN)|ELEASE_VERSION)|M(INOR_VERSION|A(XPATHLEN|JOR_VERSION))|BINDIR|S(HLIB_SUFFIX|YSCONFDIR|API)|CONFIG_FILE_(SCAN_DIR|PATH)|INT_(MAX|SIZE)|ZTS|O(S|UTPUT_HANDLER_(START|CONT|END))|D(EBUG|ATADIR)|URL_(SCHEME|HOST|USER|P(ORT|A(SS|TH))|QUERY|FRAGMENT)|PREFIX|E(XT(RA_VERSION|ENSION_DIR)|OL)|VERSION(_ID)?|WINDOWS_(NT_(SERVER|DOMAIN_CONTROLLER|WORKSTATION)|VERSION_(M(INOR|AJOR)|BUILD|S(UITEMASK|P_M(INOR|AJOR))|P(RODUCTTYPE|LATFORM)))|L(IBDIR|OCALSTATEDIR))|EAR_(INSTALL_DIR|EXTENSION_DIR))|E_(RECOVERABLE_ERROR|STRICT|NOTICE|CO(RE_(ERROR|WARNING)|MPILE_(ERROR|WARNING))|DEPRECATED|USER_(NOTICE|DEPRECATED|ERROR|WARNING)|PARSE|ERROR|WARNING|ALL))\b
146
+ name: support.constant.core.php
147
+ - captures:
148
+ '1':
149
+ name: punctuation.separator.inheritance.php
150
+ match: (\\)?\b(RADIXCHAR|GROUPING|M(_(1_PI|SQRT(1_2|2|3|PI)|2_(SQRTPI|PI)|PI(_(2|4))?|E(ULER)?|L(N(10|2|PI)|OG(10E|2E)))|ON_(GROUPING|1(1|2|0)?|7|2|8|THOUSANDS_SEP|3|DECIMAL_POINT|9|4|5|6))|S(TR_PAD_(RIGHT|BOTH|LEFT)|ORT_(REGULAR|STRING|NUMERIC|DESC|LOCALE_STRING|ASC)|EEK_(SET|CUR|END))|H(TML_(SPECIALCHARS|ENTITIES)|ASH_HMAC)|YES(STR|EXPR)|N(_(S(IGN_POSN|EP_BY_SPACE)|CS_PRECEDES)|O(STR|EXPR)|EGATIVE_SIGN|AN)|C(R(YPT_(MD5|BLOWFISH|S(HA(256|512)|TD_DES|ALT_LENGTH)|EXT_DES)|NCYSTR|EDITS_(G(ROUP|ENERAL)|MODULES|SAPI|DOCS|QA|FULLPAGE|ALL))|HAR_MAX|O(NNECTION_(NORMAL|TIMEOUT|ABORTED)|DESET|UNT_(RECURSIVE|NORMAL))|URRENCY_SYMBOL|ASE_(UPPER|LOWER))|__COMPILER_HALT_OFFSET__|T(HOUS(EP|ANDS_SEP)|_FMT(_AMPM)?)|IN(T_(CURR_SYMBOL|FRAC_DIGITS)|I_(S(YSTEM|CANNER_(RAW|NORMAL))|USER|PERDIR|ALL)|F(O_(GENERAL|MODULES|C(REDITS|ONFIGURATION)|ENVIRONMENT|VARIABLES|LICENSE|ALL))?)|D(_(T_FMT|FMT)|IRECTORY_SEPARATOR|ECIMAL_POINT|A(Y_(1|7|2|3|4|5|6)|TE_(R(SS|FC(1(123|036)|2822|8(22|50)|3339))|COOKIE|ISO8601|W3C|ATOM)))|UPLOAD_ERR_(NO_(TMP_DIR|FILE)|CANT_WRITE|INI_SIZE|OK|PARTIAL|EXTENSION|FORM_SIZE)|P(M_STR|_(S(IGN_POSN|EP_BY_SPACE)|CS_PRECEDES)|OSITIVE_SIGN|ATH(_SEPARATOR|INFO_(BASENAME|DIRNAME|EXTENSION|FILENAME)))|E(RA(_(YEAR|T_FMT|D_(T_FMT|FMT)))?|XTR_(REFS|SKIP|IF_EXISTS|OVERWRITE|PREFIX_(SAME|I(NVALID|F_EXISTS)|ALL))|NT_(NOQUOTES|COMPAT|IGNORE|QUOTES))|FRAC_DIGITS|L(C_(M(ONETARY|ESSAGES)|NUMERIC|C(TYPE|OLLATE)|TIME|ALL)|O(G_(MAIL|SYSLOG|N(O(TICE|WAIT)|DELAY|EWS)|C(R(IT|ON)|ONS)|INFO|ODELAY|D(EBUG|AEMON)|U(SER|UCP)|P(ID|ERROR)|E(RR|MERG)|KERN|WARNING|L(OCAL(1|7|2|3|4|5|0|6)|PR)|A(UTH(PRIV)?|LERT))|CK_(SH|NB|UN|EX)))|A(M_STR|B(MON_(1(1|2|0)?|7|2|8|3|9|4|5|6)|DAY_(1|7|2|3|4|5|6))|SSERT_(BAIL|CALLBACK|QUIET_EVAL|WARNING|ACTIVE)|LT_DIGITS))\b
151
+ name: support.constant.std.php
152
+ - captures:
153
+ '1':
154
+ name: punctuation.separator.inheritance.php
155
+ match: (\\)?\b(GLOB_(MARK|BRACE|NO(SORT|CHECK|ESCAPE)|ONLYDIR|ERR|AVAILABLE_FLAGS)|XML_(SAX_IMPL|HTML_DOCUMENT_NODE|N(OTATION_NODE|AMESPACE_DECL_NODE)|C(OMMENT_NODE|DATA_SECTION_NODE)|TEXT_NODE|OPTION_(SKIP_(TAGSTART|WHITE)|CASE_FOLDING|TARGET_ENCODING)|D(TD_NODE|OCUMENT_(NODE|TYPE_NODE|FRAG_NODE))|PI_NODE|E(RROR_(RECURSIVE_ENTITY_REF|MISPLACED_XML_PI|B(INARY_ENTITY_REF|AD_CHAR_REF)|SYNTAX|NO(NE|_(MEMORY|ELEMENTS))|TAG_MISMATCH|IN(CORRECT_ENCODING|VALID_TOKEN)|DUPLICATE_ATTRIBUTE|UN(CLOSED_(CDATA_SECTION|TOKEN)|DEFINED_ENTITY|KNOWN_ENCODING)|JUNK_AFTER_DOC_ELEMENT|PAR(TIAL_CHAR|AM_ENTITY_REF)|EXTERNAL_ENTITY_HANDLING|A(SYNC_ENTITY|TTRIBUTE_EXTERNAL_ENTITY_REF))|NTITY_(REF_NODE|NODE|DECL_NODE)|LEMENT_(NODE|DECL_NODE))|LOCAL_NAMESPACE|ATTRIBUTE_(N(MTOKEN(S)?|O(TATION|DE))|CDATA|ID(REF(S)?)?|DECL_NODE|EN(TITY|UMERATION)))|M(HASH_(RIPEMD(1(28|60)|256|320)|GOST|MD(2|4|5)|S(HA(1|2(24|56)|384|512)|NEFRU256)|HAVAL(1(28|92|60)|2(24|56))|CRC32(B)?|TIGER(1(28|60))?|WHIRLPOOL|ADLER32)|YSQL(_(BOTH|NUM|CLIENT_(SSL|COMPRESS|I(GNORE_SPACE|NTERACTIVE))|ASSOC)|I_(RE(PORT_(STRICT|INDEX|OFF|ERROR|ALL)|FRESH_(GRANT|MASTER|BACKUP_LOG|S(TATUS|LAVE)|HOSTS|T(HREADS|ABLES)|LOG)|AD_DEFAULT_(GROUP|FILE))|GROUP_FLAG|MULTIPLE_KEY_FLAG|B(INARY_FLAG|OTH|LOB_FLAG)|S(T(MT_ATTR_(CURSOR_TYPE|UPDATE_MAX_LENGTH|PREFETCH_ROWS)|ORE_RESULT)|E(RVER_QUERY_(NO_(GOOD_INDEX_USED|INDEX_USED)|WAS_SLOW)|T_(CHARSET_NAME|FLAG)))|N(O(_D(EFAULT_VALUE_FLAG|ATA)|T_NULL_FLAG)|UM(_FLAG)?)|C(URSOR_TYPE_(READ_ONLY|SCROLLABLE|NO_CURSOR|FOR_UPDATE)|LIENT_(SSL|NO_SCHEMA|COMPRESS|I(GNORE_SPACE|NTERACTIVE)|FOUND_ROWS))|T(YPE_(GEOMETRY|MEDIUM_BLOB|B(IT|LOB)|S(HORT|TRING|ET)|YEAR|N(ULL|EWD(ECIMAL|ATE))|CHAR|TI(ME(STAMP)?|NY(_BLOB)?)|INT(24|ERVAL)|D(OUBLE|ECIMAL|ATE(TIME)?)|ENUM|VAR_STRING|FLOAT|LONG(_BLOB|LONG)?)|IMESTAMP_FLAG)|INIT_COMMAND|ZEROFILL_FLAG|O(N_UPDATE_NOW_FLAG|PT_(NET_(READ_BUFFER_SIZE|CMD_BUFFER_SIZE)|CONNECT_TIMEOUT|INT_AND_FLOAT_NATIVE|LOCAL_INFILE))|D(EBUG_TRACE_ENABLED|ATA_TRUNCATED)|U(SE_RESULT|N(SIGNED_FLAG|IQUE_KEY_FLAG))|P(RI_KEY_FLAG|ART_KEY_FLAG)|ENUM_FLAG|A(S(SOC|YNC)|UTO_INCREMENT_FLAG)))|CRYPT_(R(C(2|6)|IJNDAEL_(1(28|92)|256)|AND)|GOST|XTEA|M(ODE_(STREAM|NOFB|C(BC|FB)|OFB|ECB)|ARS)|BLOWFISH(_COMPAT)?|S(ERPENT|KIPJACK|AFER(128|PLUS|64))|C(RYPT|AST_(128|256))|T(RIPLEDES|HREEWAY|WOFISH)|IDEA|3DES|DE(S|CRYPT|V_(RANDOM|URANDOM))|PANAMA|EN(CRYPT|IGNA)|WAKE|LOKI97|ARCFOUR(_IV)?))|S(TREAM_(REPORT_ERRORS|M(UST_SEEK|KDIR_RECURSIVE)|BUFFER_(NONE|FULL|LINE)|S(HUT_(RD(WR)?|WR)|OCK_(R(DM|AW)|S(TREAM|EQPACKET)|DGRAM)|ERVER_(BIND|LISTEN))|NOTIFY_(RE(SOLVE|DIRECTED)|MIME_TYPE_IS|SEVERITY_(INFO|ERR|WARN)|CO(MPLETED|NNECT)|PROGRESS|F(ILE_SIZE_IS|AILURE)|AUTH_RE(SULT|QUIRED))|C(RYPTO_METHOD_(SSLv(2(_(SERVER|CLIENT)|3_(SERVER|CLIENT))|3_(SERVER|CLIENT))|TLS_(SERVER|CLIENT))|LIENT_(CONNECT|PERSISTENT|ASYNC_CONNECT)|AST_(FOR_SELECT|AS_STREAM))|I(GNORE_URL|S_URL|PPROTO_(RAW|TCP|I(CMP|P)|UDP))|O(OB|PTION_(READ_(BUFFER|TIMEOUT)|BLOCKING|WRITE_BUFFER))|U(RL_STAT_(QUIET|LINK)|SE_PATH)|P(EEK|F_(INET(6)?|UNIX))|ENFORCE_SAFE_MODE|FILTER_(READ|WRITE|ALL))|UNFUNCS_RET_(STRING|TIMESTAMP|DOUBLE)|QLITE(_(R(OW|EADONLY)|MIS(MATCH|USE)|B(OTH|USY)|SCHEMA|N(O(MEM|T(FOUND|ADB)|LFS)|UM)|C(O(RRUPT|NSTRAINT)|ANTOPEN)|TOOBIG|I(NTER(RUPT|NAL)|OERR)|OK|DONE|P(ROTOCOL|ERM)|E(RROR|MPTY)|F(ORMAT|ULL)|LOCKED|A(BORT|SSOC|UTH))|3_(B(OTH|LOB)|NU(M|LL)|TEXT|INTEGER|OPEN_(READ(ONLY|WRITE)|CREATE)|FLOAT|ASSOC)))|CURL(M(SG_DONE|_(BAD_(HANDLE|EASY_HANDLE)|CALL_MULTI_PERFORM|INTERNAL_ERROR|O(UT_OF_MEMORY|K)))|SSH_AUTH_(HOST|NONE|DEFAULT|P(UBLICKEY|ASSWORD)|KEYBOARD)|CLOSEPOLICY_(SLOWEST|CALLBACK|OLDEST|LEAST_(RECENTLY_USED|TRAFFIC))|_(HTTP_VERSION_(1_(1|0)|NONE)|NETRC_(REQUIRED|IGNORED|OPTIONAL)|TIMECOND_(IF(MODSINCE|UNMODSINCE)|LASTMOD)|IPRESOLVE_(V(4|6)|WHATEVER)|VERSION_(SSL|IPV6|KERBEROS4|LIBZ))|INFO_(RE(DIRECT_(COUNT|TIME)|QUEST_SIZE)|S(SL_VERIFYRESULT|TARTTRANSFER_TIME|IZE_(DOWNLOAD|UPLOAD)|PEED_(DOWNLOAD|UPLOAD))|H(TTP_CODE|EADER_(SIZE|OUT))|NAMELOOKUP_TIME|C(ON(NECT_TIME|TENT_(TYPE|LENGTH_(DOWNLOAD|UPLOAD)))|ERTINFO)|TOTAL_TIME|PR(IVATE|ETRANSFER_TIME)|EFFECTIVE_URL|FILETIME)|OPT_(R(E(SUME_FROM|TURNTRANSFER|DIR_PROTOCOLS|FERER|AD(DATA|FUNCTION))|AN(GE|DOM_FILE))|MAX(REDIRS|CONNECTS)|B(INARYTRANSFER|UFFERSIZE)|S(S(H_(HOST_PUBLIC_KEY_MD5|P(RIVATE_KEYFILE|UBLIC_KEYFILE)|AUTH_TYPES)|L(CERT(TYPE|PASSWD)?|_(CIPHER_LIST|VERIFY(HOST|PEER))|ENGINE(_DEFAULT)?|VERSION|KEY(TYPE|PASSWD)?))|TDERR)|H(TTP(GET|HEADER|200ALIASES|_VERSION|PROXYTUNNEL|AUTH)|EADER(FUNCTION)?)|N(O(BODY|SIGNAL|PROGRESS)|ETRC)|C(RLF|O(NNECTTIMEOUT(_MS)?|OKIE(SESSION|JAR|FILE)?)|USTOMREQUEST|ERTINFO|LOSEPOLICY|A(INFO|PATH))|T(RANSFERTEXT|CP_NODELAY|IME(CONDITION|OUT(_MS)?|VALUE))|I(N(TERFACE|FILE(SIZE)?)|PRESOLVE)|DNS_(CACHE_TIMEOUT|USE_GLOBAL_CACHE)|U(RL|SER(PWD|AGENT)|NRESTRICTED_AUTH|PLOAD)|P(R(IVATE|O(GRESSFUNCTION|XY(TYPE|USERPWD|PORT|AUTH)?|TOCOLS))|O(RT|ST(REDIR|QUOTE|FIELDS)?)|UT)|E(GDSOCKET|NCODING)|VERBOSE|K(RB4LEVEL|EYPASSWD)|QUOTE|F(RESH_CONNECT|TP(SSLAUTH|_(S(SL|KIP_PASV_IP)|CREATE_MISSING_DIRS|USE_EP(RT|SV)|FILEMETHOD)|PORT|LISTONLY|APPEND)|ILE(TIME)?|O(RBID_REUSE|LLOWLOCATION)|AILONERROR)|WRITE(HEADER|FUNCTION)|LOW_SPEED_(TIME|LIMIT)|AUTOREFERER)|PRO(XY_(SOCKS(4|5)|HTTP)|TO_(S(CP|FTP)|HTTP(S)?|T(ELNET|FTP)|DICT|F(TP(S)?|ILE)|LDAP(S)?|ALL))|E_(RE(CV_ERROR|AD_ERROR)|GOT_NOTHING|MALFORMAT_USER|BAD_(C(ONTENT_ENCODING|ALLING_ORDER)|PASSWORD_ENTERED|FUNCTION_ARGUMENT)|S(S(H|L_(C(IPHER|ONNECT_ERROR|ERTPROBLEM|ACERT)|PEER_CERTIFICATE|ENGINE_(SETFAILED|NOTFOUND)))|HARE_IN_USE|END_ERROR)|HTTP_(RANGE_ERROR|NOT_FOUND|PO(RT_FAILED|ST_ERROR))|COULDNT_(RESOLVE_(HOST|PROXY)|CONNECT)|T(OO_MANY_REDIRECTS|ELNET_OPTION_SYNTAX)|O(BSOLETE|UT_OF_MEMORY|PERATION_TIMEOUTED|K)|U(RL_MALFORMAT(_USER)?|N(SUPPORTED_PROTOCOL|KNOWN_TELNET_OPTION))|PARTIAL_FILE|F(TP_(BAD_DOWNLOAD_RESUME|SSL_FAILED|C(OULDNT_(RETR_FILE|GET_SIZE|S(TOR_FILE|ET_(BINARY|ASCII))|USE_REST)|ANT_(RECONNECT|GET_HOST))|USER_PASSWORD_INCORRECT|PORT_FAILED|QUOTE_ERROR|W(RITE_ERROR|EIRD_(SERVER_REPLY|227_FORMAT|USER_REPLY|PAS(S_REPLY|V_REPLY)))|ACCESS_DENIED)|ILE(SIZE_EXCEEDED|_COULDNT_READ_FILE)|UNCTION_NOT_FOUND|AILED_INIT)|WRITE_ERROR|L(IBRARY_NOT_FOUND|DAP_(SEARCH_FAILED|CANNOT_BIND|INVALID_URL))|ABORTED_BY_CALLBACK)|VERSION_NOW|FTP(METHOD_(MULTICWD|SINGLECWD|NOCWD)|SSL_(NONE|CONTROL|TRY|ALL)|AUTH_(SSL|TLS|DEFAULT))|AUTH_(GSSNEGOTIATE|BASIC|NTLM|DIGEST|ANY(SAFE)?))|I(MAGETYPE_(GIF|XBM|BMP|SWF|COUNT|TIFF_(MM|II)|I(CO|FF)|UNKNOWN|J(B2|P(X|2|C|EG(2000)?))|P(SD|NG)|WBMP)|NPUT_(REQUEST|GET|SE(RVER|SSION)|COOKIE|POST|ENV)|CONV_(MIME_DECODE_(STRICT|CONTINUE_ON_ERROR)|IMPL|VERSION))|D(NS_(MX|S(RV|OA)|HINFO|N(S|APTR)|CNAME|TXT|PTR|A(NY|LL|AAA|6)?)|OM(STRING_SIZE_ERR|_(SYNTAX_ERR|HIERARCHY_REQUEST_ERR|N(O(_(MODIFICATION_ALLOWED_ERR|DATA_ALLOWED_ERR)|T_(SUPPORTED_ERR|FOUND_ERR))|AMESPACE_ERR)|IN(DEX_SIZE_ERR|USE_ATTRIBUTE_ERR|VALID_(MODIFICATION_ERR|STATE_ERR|CHARACTER_ERR|ACCESS_ERR))|PHP_ERR|VALIDATION_ERR|WRONG_DOCUMENT_ERR)))|JSON_(HEX_(TAG|QUOT|A(MP|POS))|NUMERIC_CHECK|ERROR_(S(YNTAX|TATE_MISMATCH)|NONE|CTRL_CHAR|DEPTH|UTF8)|FORCE_OBJECT)|P(REG_(RECURSION_LIMIT_ERROR|GREP_INVERT|BA(CKTRACK_LIMIT_ERROR|D_UTF8_(OFFSET_ERROR|ERROR))|S(PLIT_(NO_EMPTY|OFFSET_CAPTURE|DELIM_CAPTURE)|ET_ORDER)|NO_ERROR|INTERNAL_ERROR|OFFSET_CAPTURE|PATTERN_ORDER)|SFS_(PASS_ON|ERR_FATAL|F(EED_ME|LAG_(NORMAL|FLUSH_(CLOSE|INC))))|CRE_VERSION|OSIX_(R_OK|X_OK|S_IF(REG|BLK|SOCK|CHR|IFO)|F_OK|W_OK))|F(NM_(NOESCAPE|CASEFOLD|P(ERIOD|ATHNAME))|IL(TER_(REQUIRE_(SCALAR|ARRAY)|SANITIZE_(MAGIC_QUOTES|S(TRI(NG|PPED)|PECIAL_CHARS)|NUMBER_(INT|FLOAT)|URL|E(MAIL|NCODED)|FULL_SPECIAL_CHARS)|NULL_ON_FAILURE|CALLBACK|DEFAULT|UNSAFE_RAW|VALIDATE_(REGEXP|BOOLEAN|I(NT|P)|URL|EMAIL|FLOAT)|F(ORCE_ARRAY|LAG_(S(CHEME_REQUIRED|TRIP_(BACKTICK|HIGH|LOW))|HOST_REQUIRED|NO(NE|_(RES_RANGE|PRIV_RANGE|ENCODE_QUOTES))|IPV(4|6)|PATH_REQUIRED|E(MPTY_STRING_NULL|NCODE_(HIGH|LOW|AMP))|QUERY_REQUIRED|ALLOW_(SCIENTIFIC|HEX|THOUSAND|OCTAL|FRACTION))))|E(_(BINARY|SKIP_EMPTY_LINES|NO_DEFAULT_CONTEXT|TEXT|IGNORE_NEW_LINES|USE_INCLUDE_PATH|APPEND)|INFO_(RAW|MIME(_(TYPE|ENCODING))?|SYMLINK|NONE|CONTINUE|DEVICES|PRESERVE_ATIME)))|ORCE_(GZIP|DEFLATE))|LIBXML_(XINCLUDE|N(SCLEAN|O(XMLDECL|BLANKS|NET|CDATA|E(RROR|MPTYTAG|NT)|WARNING))|COMPACT|D(TD(VALID|LOAD|ATTR)|OTTED_VERSION)|PARSEHUGE|ERR_(NONE|ERROR|FATAL|WARNING)|VERSION|LOADED_VERSION))\b
156
+ name: support.constant.ext.php
157
+ - captures:
158
+ '1':
159
+ name: punctuation.separator.inheritance.php
160
+ match: (\\)?\bT_(RE(TURN|QUIRE(_ONCE)?)|G(OTO|LOBAL)|XOR_EQUAL|M(INUS_EQUAL|OD_EQUAL|UL_EQUAL|ETHOD_C|L_COMMENT)|B(REAK|OOL(_CAST|EAN_(OR|AND))|AD_CHARACTER)|S(R(_EQUAL)?|T(RING(_(CAST|VARNAME))?|A(RT_HEREDOC|TIC))|WITCH|L(_EQUAL)?)|HALT_COMPILER|N(S_(SEPARATOR|C)|UM_STRING|EW|AMESPACE)|C(HARACTER|O(MMENT|N(ST(ANT_ENCAPSED_STRING)?|CAT_EQUAL|TINUE))|URLY_OPEN|L(O(SE_TAG|NE)|ASS(_C)?)|A(SE|TCH))|T(RY|HROW)|I(MPLEMENTS|S(SET|_(GREATER_OR_EQUAL|SMALLER_OR_EQUAL|NOT_(IDENTICAL|EQUAL)|IDENTICAL|EQUAL))|N(STANCEOF|C(LUDE(_ONCE)?)?|T(_CAST|ERFACE)|LINE_HTML)|F)|O(R_EQUAL|BJECT_(CAST|OPERATOR)|PEN_TAG(_WITH_ECHO)?|LD_FUNCTION)|D(NUMBER|I(R|V_EQUAL)|O(C_COMMENT|UBLE_(C(OLON|AST)|ARROW)|LLAR_OPEN_CURLY_BRACES)?|E(C(LARE)?|FAULT))|U(SE|NSET(_CAST)?)|P(R(I(NT|VATE)|OTECTED)|UBLIC|LUS_EQUAL|AAMAYIM_NEKUDOTAYIM)|E(X(TENDS|IT)|MPTY|N(CAPSED_AND_WHITESPACE|D(SWITCH|_HEREDOC|IF|DECLARE|FOR(EACH)?|WHILE))|CHO|VAL|LSE(IF)?)|VAR(IABLE)?|F(I(NAL|LE)|OR(EACH)?|UNC(_C|TION))|WHI(TESPACE|LE)|L(NUMBER|I(ST|NE)|OGICAL_(XOR|OR|AND))|A(RRAY(_CAST)?|BSTRACT|S|ND_EQUAL))\b
161
+ name: support.constant.parser-token.php
162
+ - comment: ! "In PHP, any identifier which is not a variable is taken to be
163
+ a constant.\n \t\t\t\tHowever, if there is no constant defined with
164
+ the given name then a notice\n \t\t\t\tis generated and the constant
165
+ is assumed to have the value of its name."
166
+ match: ! '[a-zA-Z_][a-zA-Z0-9_]*'
167
+ name: constant.other.php
168
+ function-arguments:
169
+ patterns:
170
+ - include: ! '#comments'
171
+ - begin: ! "(?x)\n\t\t\t\t\t\t\t\\s*(array) # Typehint\n\t\t\t\t\t\t\t\\s*(&)?
172
+ \t\t\t\t\t# Reference\n\t\t\t\t\t\t\t\\s*((\\$+)[a-zA-Z_][a-zA-Z0-9_]*)
173
+ # The variable name\n\t\t\t\t\t\t\t\\s*(=)\t# A default value\n\t\t\t\t\t\t\t\\s*(array)\\s*(\\()\n\t\t\t\t\t\t\t"
174
+ beginCaptures:
175
+ '1':
176
+ name: storage.type.php
177
+ '2':
178
+ name: storage.modifier.reference.php
179
+ '3':
180
+ name: variable.other.php
181
+ '4':
182
+ name: punctuation.definition.variable.php
183
+ '5':
184
+ name: keyword.operator.assignment.php
185
+ '6':
186
+ name: support.function.construct.php
187
+ '7':
188
+ name: punctuation.definition.array.begin.php
189
+ contentName: meta.array.php
190
+ end: \)
191
+ endCaptures:
192
+ '0':
193
+ name: punctuation.definition.array.end.php
194
+ name: meta.function.argument.array.php
195
+ patterns:
196
+ - include: ! '#comments'
197
+ - include: ! '#strings'
198
+ - include: ! '#numbers'
199
+ - captures:
200
+ '1':
201
+ name: storage.type.php
202
+ '2':
203
+ name: storage.modifier.reference.php
204
+ '3':
205
+ name: variable.other.php
206
+ '4':
207
+ name: punctuation.definition.variable.php
208
+ '5':
209
+ name: keyword.operator.assignment.php
210
+ '6':
211
+ name: constant.language.php
212
+ '7':
213
+ name: invalid.illegal.non-null-typehinted.php
214
+ match: ! "(?xi)\n\t\t\t\t\t\t\t\\s*(array) # Typehint\n\t\t\t\t\t\t\t\\s*(&)?
215
+ \t\t\t\t\t# Reference\n\t\t\t\t\t\t\t\\s*((\\$+)[a-z_][a-z0-9_]*)
216
+ # The variable name\n\t\t\t\t\t\t\t(?:\n\t\t\t\t\t\t\t\t\\s*(?:(=)\\s*(?:(null)|((?:\\S*?\\(\\))|(?:\\S*?))))\t#
217
+ A default value\n\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t\\s*(?=,|\\)|/[/*]|\\#|$)
218
+ # A closing parentheses (end of argument list) or a comma or a comment\n\t\t\t\t\t\t\t"
219
+ name: meta.function.argument.array.php
220
+ - begin: (?i)(?=[a-z_0-9\\]*[a-z_][a-z_0-9]*\s*&?\s*\$)
221
+ end: (?=,|\)|/[/*]|\#|$)
222
+ name: meta.function.argument.typehinted.php
223
+ patterns:
224
+ - include: ! '#class-name'
225
+ - captures:
226
+ '1':
227
+ name: support.class.php
228
+ '2':
229
+ name: storage.modifier.reference.php
230
+ '3':
231
+ name: variable.other.php
232
+ '4':
233
+ name: punctuation.definition.variable.php
234
+ '5':
235
+ name: keyword.operator.assignment.php
236
+ '6':
237
+ name: constant.language.php
238
+ '7':
239
+ name: invalid.illegal.non-null-typehinted.php
240
+ match: ! "(?xi)\n \t\t\t\t\t\t\t\\s*([a-z_][a-z_0-9]*)? # Typehinted
241
+ class name\n \t\t\t\t\t\t\t\\s*(&)? \t\t\t\t\t# Reference\n \t\t\t\t\t\t\t\\s*((\\$+)[a-z_][a-z0-9_]*)
242
+ # The variable name\n \t\t\t\t\t\t\t(?:\n \t\t\t\t\t\t\t\t\\s*(?:(=)\\s*(?:(null)|((?:\\S*?\\(\\))|(?:\\S*?))))\t#
243
+ A default value\n \t\t\t\t\t\t\t)?\n \t\t\t\t\t\t\t\\s*(?=,|\\)|/[/*]|\\#|$)
244
+ # A closing parentheses (end of argument list) or a comma\n\t\t\t\t\t "
245
+ - captures:
246
+ '1':
247
+ name: storage.modifier.reference.php
248
+ '2':
249
+ name: variable.other.php
250
+ '3':
251
+ name: punctuation.definition.variable.php
252
+ match: (\s*&)?\s*((\$+)[a-zA-Z_][a-zA-Z0-9_]*)\s*(?=,|\)|/[/*]|\#)
253
+ name: meta.function.argument.no-default.php
254
+ - begin: (\s*&)?\s*((\$+)[a-zA-Z_][a-zA-Z0-9_]*)(?:\s*(=)\s*)\s*
255
+ captures:
256
+ '1':
257
+ name: storage.modifier.reference.php
258
+ '2':
259
+ name: variable.other.php
260
+ '3':
261
+ name: punctuation.definition.variable.php
262
+ '4':
263
+ name: keyword.operator.assignment.php
264
+ end: (?=,|\)|/[/*]|\#)
265
+ name: meta.function.argument.default.php
266
+ patterns:
267
+ - include: ! '#parameter-default-types'
268
+ function-call:
269
+ patterns:
270
+ - begin: (?i)(?=\\?[a-z_0-9\\]+\\[a-z_][a-z0-9_]*\s*\()
271
+ comment: Functions in a user-defined namespace (overrides any built-ins)
272
+ end: (?=\s*\()
273
+ patterns:
274
+ - include: ! '#user-function-call'
275
+ - match: (?i)\b(print|echo)\b
276
+ name: support.function.construct.php
277
+ - begin: (?i)(\\)?(?=\b[a-z_][a-z_0-9]*\s*\()
278
+ beginCaptures:
279
+ '1':
280
+ name: punctuation.separator.inheritance.php
281
+ comment: Root namespace function calls (built-in or user)
282
+ end: (?=\s*\()
283
+ patterns:
284
+ - match: (?i)\b(isset|unset|e(val|mpty)|list)(?=\s*\()
285
+ name: support.function.construct.php
286
+ - include: ! '#support'
287
+ - include: ! '#user-function-call'
288
+ heredoc:
289
+ begin: (?=<<<\s*('?)([a-zA-Z_]+[a-zA-Z0-9_]*)(\1)\s*$)
290
+ end: ^((HTML|XML|SQL|JAVASCRIPT|JSON|CSS)|\2)\b
291
+ endCaptures:
292
+ '1':
293
+ name: keyword.operator.heredoc.php
294
+ '2':
295
+ name: punctuation.section.embedded.end.php
296
+ name: string.unquoted.heredoc.php
297
+ patterns:
298
+ - begin: (<<<)\s*(HTML)\s*$\n?
299
+ beginCaptures:
300
+ '0':
301
+ name: punctuation.section.embedded.begin.php
302
+ '1':
303
+ name: punctuation.definition.string.php
304
+ '2':
305
+ name: keyword.operator.heredoc.php
306
+ contentName: text.html
307
+ end: (?=^\2\b)
308
+ name: meta.embedded.html
309
+ patterns:
310
+ - include: text.html.basic
311
+ - include: ! '#interpolation'
312
+ - begin: (<<<)\s*(XML)\s*$\n?
313
+ beginCaptures:
314
+ '0':
315
+ name: punctuation.section.embedded.begin.php
316
+ '1':
317
+ name: punctuation.definition.string.php
318
+ '2':
319
+ name: keyword.operator.heredoc.php
320
+ contentName: text.xml
321
+ end: (?=^\2\b)
322
+ name: meta.embedded.xml
323
+ patterns:
324
+ - include: text.xml
325
+ - include: ! '#interpolation'
326
+ - begin: (<<<)\s*(SQL)\s*$\n?
327
+ beginCaptures:
328
+ '0':
329
+ name: punctuation.section.embedded.begin.php
330
+ '1':
331
+ name: punctuation.definition.string.php
332
+ '2':
333
+ name: keyword.operator.heredoc.php
334
+ contentName: source.sql
335
+ end: (?=^\2\b)
336
+ name: meta.embedded.sql
337
+ patterns:
338
+ - include: source.sql
339
+ - include: ! '#interpolation'
340
+ - begin: (<<<)\s*(JAVASCRIPT)\s*$\n?
341
+ beginCaptures:
342
+ '0':
343
+ name: punctuation.section.embedded.begin.php
344
+ '1':
345
+ name: punctuation.definition.string.php
346
+ '2':
347
+ name: keyword.operator.heredoc.php
348
+ contentName: source.js
349
+ end: (?=^\2\b)
350
+ name: meta.embedded.js
351
+ patterns:
352
+ - include: source.js
353
+ - include: ! '#interpolation'
354
+ - begin: (<<<)\s*(JSON)\s*$\n?
355
+ beginCaptures:
356
+ '0':
357
+ name: punctuation.section.embedded.begin.php
358
+ '1':
359
+ name: punctuation.definition.string.php
360
+ '2':
361
+ name: keyword.operator.heredoc.php
362
+ contentName: source.json
363
+ end: (?=^\2\b)
364
+ name: meta.embedded.json
365
+ patterns:
366
+ - include: source.json
367
+ - include: ! '#interpolation'
368
+ - begin: (<<<)\s*(CSS)\s*$\n?
369
+ beginCaptures:
370
+ '0':
371
+ name: punctuation.section.embedded.begin.php
372
+ '1':
373
+ name: punctuation.definition.string.php
374
+ '2':
375
+ name: keyword.operator.heredoc.php
376
+ contentName: source.css
377
+ end: (?=^\2\b)
378
+ name: meta.embedded.css
379
+ patterns:
380
+ - include: source.css
381
+ - include: ! '#interpolation'
382
+ - begin: (<<<)\s*([a-zA-Z_]+[a-zA-Z0-9_]*)
383
+ beginCaptures:
384
+ '1':
385
+ name: punctuation.definition.string.php
386
+ '2':
387
+ name: keyword.operator.heredoc.php
388
+ end: (?=^\2\b)
389
+ patterns:
390
+ - include: ! '#interpolation'
391
+ - begin: (<<<)\s*'([a-zA-Z_]+[a-zA-Z0-9_]*)'
392
+ beginCaptures:
393
+ '1':
394
+ name: punctuation.definition.string.php
395
+ '2':
396
+ name: keyword.operator.heredoc.php
397
+ end: (?=^\2\b)
398
+ name: string.unquoted.nowdoc.php
399
+ instantiation:
400
+ begin: (?i)(new)\s+
401
+ beginCaptures:
402
+ '1':
403
+ name: keyword.other.new.php
404
+ end: (?i)(?=[^$a-z0-9_\\])
405
+ patterns:
406
+ - match: (parent|static|self)(?=[^a-z0-9_])
407
+ name: storage.type.php
408
+ - include: ! '#class-name'
409
+ - include: ! '#variable-name'
410
+ interpolation:
411
+ comment: http://www.php.net/manual/en/language.types.string.php#language.types.string.parsing
412
+ patterns:
413
+ - match: \\[0-7]{1,3}
414
+ name: constant.numeric.octal.php
415
+ - match: \\x[0-9A-Fa-f]{1,2}
416
+ name: constant.numeric.hex.php
417
+ - match: \\[nrt\\\$\"]
418
+ name: constant.character.escape.php
419
+ - begin: (\{)(?=\$.*?\})
420
+ beginCaptures:
421
+ '1':
422
+ name: punctuation.definition.variable.php
423
+ end: (\})
424
+ endCaptures:
425
+ '1':
426
+ name: punctuation.definition.variable.php
427
+ patterns:
428
+ - include: ! '#language'
429
+ - include: ! '#variable-name'
430
+ invoke-call:
431
+ captures:
432
+ '1':
433
+ name: punctuation.definition.variable.php
434
+ '2':
435
+ name: variable.other.php
436
+ match: (?i)(\$+)([a-z_][a-z_0-9]*)(?=\s*\()
437
+ name: meta.function-call.invoke.php
438
+ language:
439
+ patterns:
440
+ - include: ! '#comments'
441
+ - begin: (?i)^\s*(interface)\s+([a-z0-9_]+)\s*(extends)?\s*
442
+ beginCaptures:
443
+ '1':
444
+ name: storage.type.interface.php
445
+ '2':
446
+ name: entity.name.type.interface.php
447
+ '3':
448
+ name: storage.modifier.extends.php
449
+ end: ([a-zA-Z0-9_]+)?\s*(?:(?=\{)|$)
450
+ endCaptures:
451
+ '1':
452
+ name: entity.other.inherited-class.php
453
+ name: meta.interface.php
454
+ patterns:
455
+ - include: ! '#namespace'
456
+ - begin: (?i)^\s*(namespace)\b\s+(?=([a-z0-9_\\]+\s*($|[;{]|(\/[\/*])))|$)
457
+ beginCaptures:
458
+ '1':
459
+ name: keyword.other.namespace.php
460
+ contentName: entity.name.type.namespace.php
461
+ end: (?i)(?=\s*$|[^a-z0-9_\\])
462
+ name: meta.namespace.php
463
+ patterns:
464
+ - match: \\
465
+ name: punctuation.separator.inheritance.php
466
+ - begin: (?i)\s*\b(use)\s+
467
+ beginCaptures:
468
+ '1':
469
+ name: keyword.other.use.php
470
+ end: (?=;|(?:^\s*$))
471
+ name: meta.use.php
472
+ patterns:
473
+ - include: ! '#comments'
474
+ - begin: (?i)\s*(?=[a-z_0-9\\])
475
+ end: ! "(?xi)(?:\n \t\t\t (?:\\s*(as)\\b\\s*([a-z_0-9]*)\\s*(?=,|;|$))\n
476
+ \ \t\t\t |(?=,|;|$)\n \t\t\t )"
477
+ endCaptures:
478
+ '1':
479
+ name: keyword.other.use-as.php
480
+ '2':
481
+ name: support.other.namespace.use-as.php
482
+ patterns:
483
+ - include: ! '#class-builtin'
484
+ - begin: (?i)\s*(?=[\\a-z_0-9])
485
+ end: $|(?=[\s,;])
486
+ name: support.other.namespace.use.php
487
+ patterns:
488
+ - match: \\
489
+ name: punctuation.separator.inheritance.php
490
+ - match: \s*,\s*
491
+ - begin: (?i)^\s*(abstract|final)?\s*(class)\s+([a-z0-9_]+)\s*
492
+ beginCaptures:
493
+ '1':
494
+ name: storage.modifier.abstract.php
495
+ '2':
496
+ name: storage.type.class.php
497
+ '3':
498
+ name: entity.name.type.class.php
499
+ end: (?=[;{])
500
+ name: meta.class.php
501
+ patterns:
502
+ - include: ! '#comments'
503
+ - begin: (?i)(extends)\s+
504
+ beginCaptures:
505
+ '1':
506
+ name: storage.modifier.extends.php
507
+ contentName: meta.other.inherited-class.php
508
+ end: (?i)(?=[^a-z_0-9\\])
509
+ patterns:
510
+ - begin: (?i)(?=\\?[a-z_0-9]+\\)
511
+ end: (?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\])
512
+ endCaptures:
513
+ '1':
514
+ name: entity.other.inherited-class.php
515
+ patterns:
516
+ - include: ! '#namespace'
517
+ - include: ! '#class-builtin'
518
+ - include: ! '#namespace'
519
+ - match: (?i)[a-z_][a-z_0-9]*
520
+ name: entity.other.inherited-class.php
521
+ - begin: (?i)(implements)\s+
522
+ beginCaptures:
523
+ '1':
524
+ name: storage.modifier.implements.php
525
+ end: (?i)(?=[;{])
526
+ patterns:
527
+ - include: ! '#comments'
528
+ - begin: (?i)(?=[a-z0-9_\\]+)
529
+ contentName: meta.other.inherited-class.php
530
+ end: (?i)(?:\s*(?:,|(?=[^a-z0-9_\\\s]))\s*)
531
+ patterns:
532
+ - begin: (?i)(?=\\?[a-z_0-9]+\\)
533
+ end: (?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\])
534
+ endCaptures:
535
+ '1':
536
+ name: entity.other.inherited-class.php
537
+ patterns:
538
+ - include: ! '#namespace'
539
+ - include: ! '#class-builtin'
540
+ - include: ! '#namespace'
541
+ - match: (?i)[a-z_][a-z_0-9]*
542
+ name: entity.other.inherited-class.php
543
+ - match: \s*\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
544
+ name: keyword.control.php
545
+ - begin: (?i)\b((?:require|include)(?:_once)?)\b\s*
546
+ beginCaptures:
547
+ '1':
548
+ name: keyword.control.import.include.php
549
+ end: (?=\s|;|$)
550
+ name: meta.include.php
551
+ patterns:
552
+ - include: ! '#language'
553
+ - begin: \b(catch)\b\s*\(\s*
554
+ beginCaptures:
555
+ '1':
556
+ name: keyword.control.exception.catch.php
557
+ end: ([A-Za-z_][A-Za-z_0-9]*)\s*((\$+)[a-zA-Z_][a-zA-Z0-9_]*)\s*\)
558
+ endCaptures:
559
+ '1':
560
+ name: support.class.exception.php
561
+ '2':
562
+ name: variable.other.php
563
+ '3':
564
+ name: punctuation.definition.variable.php
565
+ name: meta.catch.php
566
+ patterns:
567
+ - include: ! '#namespace'
568
+ - match: \b(catch|try|throw|exception)\b
569
+ name: keyword.control.exception.php
570
+ - begin: (?i)\b(function)\s*(&\s*)?(?=\()
571
+ beginCaptures:
572
+ '1':
573
+ name: storage.type.function.php
574
+ '2':
575
+ name: storage.modifier.reference.php
576
+ end: \{
577
+ name: meta.function.closure.php
578
+ patterns:
579
+ - begin: (\()
580
+ beginCaptures:
581
+ '1':
582
+ name: punctuation.definition.parameters.begin.php
583
+ contentName: meta.function.arguments.php
584
+ end: (\))
585
+ endCaptures:
586
+ '1':
587
+ name: punctuation.definition.parameters.end.php
588
+ patterns:
589
+ - include: ! '#function-arguments'
590
+ - begin: (?i)(use)\s*(\()
591
+ beginCaptures:
592
+ '1':
593
+ name: keyword.other.function.use.php
594
+ '2':
595
+ name: punctuation.definition.parameters.begin.php
596
+ end: (\))
597
+ endCaptures:
598
+ '1':
599
+ name: punctuation.definition.parameters.end.php
600
+ patterns:
601
+ - captures:
602
+ '1':
603
+ name: storage.modifier.reference.php
604
+ '2':
605
+ name: variable.other.php
606
+ '3':
607
+ name: punctuation.definition.variable.php
608
+ match: (\s*&)?\s*((\$+)[a-zA-Z_][a-zA-Z0-9_]*)\s*(?=,|\))
609
+ name: meta.function.closure.use.php
610
+ - begin: ! "(?x)\\s*\n\t\t\t\t\t ((?:(?:final|abstract|public|private|protected|static)\\s+)*)\n\t\t\t\t
611
+ \ (function)\n\t\t\t\t (?:\\s+|(\\s*&\\s*))\n\t\t\t\t (?:\n\t\t\t\t
612
+ \ (__(?:call|construct|destruct|get|set|isset|unset|tostring|clone|set_state|sleep|wakeup|autoload|invoke|callStatic))\n\t\t\t\t
613
+ \ |([a-zA-Z0-9_]+)\n\t\t\t\t )\n\t\t\t\t \\s*\n\t\t\t\t
614
+ \ (\\()"
615
+ beginCaptures:
616
+ '1':
617
+ name: storage.modifier.php
618
+ '2':
619
+ name: storage.type.function.php
620
+ '3':
621
+ name: storage.modifier.reference.php
622
+ '4':
623
+ name: support.function.magic.php
624
+ '5':
625
+ name: entity.name.function.php
626
+ '6':
627
+ name: punctuation.definition.parameters.begin.php
628
+ contentName: meta.function.arguments.php
629
+ end: (\))
630
+ endCaptures:
631
+ '1':
632
+ name: punctuation.definition.parameters.end.php
633
+ name: meta.function.php
634
+ patterns:
635
+ - include: ! '#function-arguments'
636
+ - include: ! '#invoke-call'
637
+ - begin: ! "(?xi)\\s*(?=\n\t\t\t\t [a-z_0-9$\\\\]+(::)\n (?:\n
638
+ \ \t\t\t\t ([a-z_][a-z_0-9]*)\\s*\\(\n \t\t\t\t |\n \t\t\t\t
639
+ \ ((\\$+)[a-z_][a-z0-9_]*)\n \t\t\t\t
640
+ \ |\n \t\t\t\t ([a-z_][a-z0-9_]*)\n
641
+ \ \t\t\t\t)?\n\t\t\t\t )"
642
+ end: ! "(?x)(::)\n (?:\n \t\t\t\t ([A-Za-z_][A-Za-z_0-9]*)\\s*\\(\n
643
+ \ \t\t\t\t |\n \t\t\t\t ((\\$+)[a-zA-Z_][a-zA-Z0-9_]*)\n
644
+ \ \t\t\t\t |\n \t\t\t\t ([a-zA-Z_][a-zA-Z0-9_]*)\n
645
+ \ \t\t\t\t)?"
646
+ endCaptures:
647
+ '1':
648
+ name: keyword.operator.class.php
649
+ '2':
650
+ name: meta.function-call.static.php
651
+ '3':
652
+ name: variable.other.class.php
653
+ '4':
654
+ name: punctuation.definition.variable.php
655
+ '5':
656
+ name: constant.other.class.php
657
+ patterns:
658
+ - match: (self|static|parent)\b
659
+ name: storage.type.php
660
+ - include: ! '#class-name'
661
+ - include: ! '#variable-name'
662
+ - include: ! '#variables'
663
+ - include: ! '#strings'
664
+ - captures:
665
+ '1':
666
+ name: support.function.construct.php
667
+ '2':
668
+ name: punctuation.definition.array.begin.php
669
+ '3':
670
+ name: punctuation.definition.array.end.php
671
+ match: (array)(\()(\))
672
+ name: meta.array.empty.php
673
+ - begin: (array)(\()
674
+ beginCaptures:
675
+ '1':
676
+ name: support.function.construct.php
677
+ '2':
678
+ name: punctuation.definition.array.begin.php
679
+ end: \)
680
+ endCaptures:
681
+ '0':
682
+ name: punctuation.definition.array.end.php
683
+ name: meta.array.php
684
+ patterns:
685
+ - include: ! '#language'
686
+ - captures:
687
+ '1':
688
+ name: storage.type.php
689
+ match: (?i)\s*\(\s*(array|real|double|float|int(eger)?|bool(ean)?|string|object|binary|unset)\s*\)
690
+ - match: (?i)\b(array|real|double|float|int(eger)?|bool(ean)?|string|class|clone|var|function|interface|parent|self|object)\b
691
+ name: storage.type.php
692
+ - match: (?i)\b(global|abstract|const|extends|implements|final|p(r(ivate|otected)|ublic)|static)\b
693
+ name: storage.modifier.php
694
+ - include: ! '#object'
695
+ - match: ;
696
+ name: punctuation.terminator.expression.php
697
+ - include: ! '#heredoc'
698
+ - match: \.=?
699
+ name: keyword.operator.string.php
700
+ - match: =>
701
+ name: keyword.operator.key.php
702
+ - captures:
703
+ '1':
704
+ name: keyword.operator.assignment.php
705
+ '2':
706
+ name: storage.modifier.reference.php
707
+ '3':
708
+ name: storage.modifier.reference.php
709
+ match: (?:(\=)(&))|(&(?=[$A-Za-z_]))
710
+ - match: (@)
711
+ name: keyword.operator.error-control.php
712
+ - match: (\-\-|\+\+)
713
+ name: keyword.operator.increment-decrement.php
714
+ - match: (\-|\+|\*|/|%)
715
+ name: keyword.operator.arithmetic.php
716
+ - match: (?i)(!|&&|\|\|)|\b(and|or|xor|as)\b
717
+ name: keyword.operator.logical.php
718
+ - include: ! '#function-call'
719
+ - match: <<|>>|~|\^|&|\|
720
+ name: keyword.operator.bitwise.php
721
+ - match: (===|==|!==|!=|<=|>=|<>|<|>)
722
+ name: keyword.operator.comparison.php
723
+ - match: =
724
+ name: keyword.operator.assignment.php
725
+ - begin: (?i)\b(instanceof)\b\s+(?=[\\$a-z_])
726
+ beginCaptures:
727
+ '1':
728
+ name: keyword.operator.type.php
729
+ end: (?=[^\\$A-Za-z_0-9])
730
+ patterns:
731
+ - include: ! '#class-name'
732
+ - include: ! '#variable-name'
733
+ - include: ! '#numbers'
734
+ - include: ! '#instantiation'
735
+ - captures:
736
+ '1':
737
+ name: keyword.control.goto.php
738
+ '2':
739
+ name: support.other.php
740
+ match: (?i)(goto)\s+([a-z_][a-z_0-9]*)
741
+ - captures:
742
+ '1':
743
+ name: entity.name.goto-label.php
744
+ match: ! '(?i)^\s*([a-z_][a-z_0-9]*)\s*:'
745
+ - include: ! '#string-backtick'
746
+ - begin: \[
747
+ beginCaptures:
748
+ '0':
749
+ name: punctuation.section.array.begin.php
750
+ end: \]
751
+ endCaptures:
752
+ '0':
753
+ name: punctuation.section.array.end.php
754
+ patterns:
755
+ - include: ! '#language'
756
+ - include: ! '#constants'
757
+ namespace:
758
+ begin: (?i)(?:(namespace)|[a-z0-9_]+)?(\\)(?=.*?[^a-z_0-9\\])
759
+ beginCaptures:
760
+ '1':
761
+ name: variable.language.namespace.php
762
+ '2':
763
+ name: punctuation.separator.inheritance.php
764
+ end: (?i)(?=[a-z0-9_]*[^a-z0-9_\\])
765
+ name: support.other.namespace.php
766
+ patterns:
767
+ - captures:
768
+ '1':
769
+ name: punctuation.separator.inheritance.php
770
+ match: (?i)(\\)
771
+ numbers:
772
+ match: \b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)\b
773
+ name: constant.numeric.php
774
+ object:
775
+ patterns:
776
+ - begin: (->)(\$?\{)
777
+ beginCaptures:
778
+ '1':
779
+ name: keyword.operator.class.php
780
+ '2':
781
+ name: punctuation.definition.variable.php
782
+ end: (\})
783
+ endCaptures:
784
+ '1':
785
+ name: punctuation.definition.variable.php
786
+ patterns:
787
+ - include: ! '#language'
788
+ - captures:
789
+ '1':
790
+ name: keyword.operator.class.php
791
+ '2':
792
+ name: meta.function-call.object.php
793
+ '3':
794
+ name: variable.other.property.php
795
+ '4':
796
+ name: punctuation.definition.variable.php
797
+ match: ! "(?x)(->)\n \t\t\t\t(?:\n \t\t\t\t ([A-Za-z_][A-Za-z_0-9]*)\\s*\\(\n
798
+ \ \t\t\t\t |\n \t\t\t\t ((\\$+)?[a-zA-Z_][a-zA-Z0-9_]*)\n
799
+ \ \t\t\t\t)?"
800
+ parameter-default-types:
801
+ patterns:
802
+ - include: ! '#strings'
803
+ - include: ! '#numbers'
804
+ - include: ! '#string-backtick'
805
+ - include: ! '#variables'
806
+ - match: =>
807
+ name: keyword.operator.key.php
808
+ - match: =
809
+ name: keyword.operator.assignment.php
810
+ - match: ! '&(?=\s*\$)'
811
+ name: storage.modifier.reference.php
812
+ - begin: (array)\s*(\()
813
+ beginCaptures:
814
+ '1':
815
+ name: support.function.construct.php
816
+ '2':
817
+ name: punctuation.definition.array.begin.php
818
+ end: \)
819
+ endCaptures:
820
+ '0':
821
+ name: punctuation.definition.array.end.php
822
+ name: meta.array.php
823
+ patterns:
824
+ - include: ! '#parameter-default-types'
825
+ - include: ! '#instantiation'
826
+ - begin: ! "(?xi)\\s*(?=\n\t\t\t\t [a-z_0-9\\\\]+(::)\n \t\t\t\t ([a-z_][a-z0-9_]*)?\n\t\t\t\t
827
+ \ )"
828
+ end: (?i)(::)([a-z_][a-z0-9_]*)?
829
+ endCaptures:
830
+ '1':
831
+ name: keyword.operator.class.php
832
+ '2':
833
+ name: constant.other.class.php
834
+ patterns:
835
+ - include: ! '#class-name'
836
+ - include: ! '#constants'
837
+ php_doc:
838
+ patterns:
839
+ - comment: PHPDocumentor only recognises lines with an asterisk as the first non-whitespaces
840
+ character
841
+ match: ^(?!\s*\*).*$\n?
842
+ name: invalid.illegal.missing-asterisk.phpdoc.php
843
+ - captures:
844
+ '1':
845
+ name: keyword.other.phpdoc.php
846
+ '3':
847
+ name: storage.modifier.php
848
+ '4':
849
+ name: invalid.illegal.wrong-access-type.phpdoc.php
850
+ match: ^\s*\*\s*(@access)\s+((public|private|protected)|(.+))\s*$
851
+ - match: ((https?|s?ftp|ftps|file|smb|afp|nfs|(x-)?man|gopher|txmt)://|mailto:)[-:@a-zA-Z0-9_.~%+/?=&#]+(?<![.?:])
852
+ name: markup.underline.link.php
853
+ - captures:
854
+ '1':
855
+ name: keyword.other.phpdoc.php
856
+ '2':
857
+ name: markup.underline.link.php
858
+ match: (@xlink)\s+(.+)\s*$
859
+ - match: \@(a(bstract|uthor)|c(ategory|opyright)|example|global|internal|li(cense|nk)|pa(ckage|ram)|return|s(ee|ince|tatic|ubpackage)|t(hrows|odo)|v(ar|ersion)|uses|deprecated|final)\b
860
+ name: keyword.other.phpdoc.php
861
+ - captures:
862
+ '1':
863
+ name: keyword.other.phpdoc.php
864
+ match: \{(@(link)).+?\}
865
+ name: meta.tag.inline.phpdoc.php
866
+ regex-double-quoted:
867
+ begin: (?x)"/ (?= (\\.|[^"/])++/[imsxeADSUXu]*" )
868
+ beginCaptures:
869
+ '0':
870
+ name: punctuation.definition.string.begin.php
871
+ end: (/)([imsxeADSUXu]*)(")
872
+ endCaptures:
873
+ '0':
874
+ name: punctuation.definition.string.end.php
875
+ name: string.regexp.double-quoted.php
876
+ patterns:
877
+ - comment: Escaped from the regexp – there can also be 2 backslashes (since 1
878
+ will escape the first)
879
+ match: (\\){1,2}[.$^\[\]{}]
880
+ name: constant.character.escape.regex.php
881
+ - include: ! '#interpolation'
882
+ - captures:
883
+ '1':
884
+ name: punctuation.definition.arbitrary-repitition.php
885
+ '3':
886
+ name: punctuation.definition.arbitrary-repitition.php
887
+ match: (\{)\d+(,\d+)?(\})
888
+ name: string.regexp.arbitrary-repitition.php
889
+ - begin: \[(?:\^?\])?
890
+ captures:
891
+ '0':
892
+ name: punctuation.definition.character-class.php
893
+ end: \]
894
+ name: string.regexp.character-class.php
895
+ patterns:
896
+ - include: ! '#interpolation'
897
+ - match: ! '[$^+*]'
898
+ name: keyword.operator.regexp.php
899
+ regex-single-quoted:
900
+ begin: (?x)'/ (?= (\\.|[^'/])++/[imsxeADSUXu]*' )
901
+ beginCaptures:
902
+ '0':
903
+ name: punctuation.definition.string.begin.php
904
+ end: (/)([imsxeADSUXu]*)(')
905
+ endCaptures:
906
+ '0':
907
+ name: punctuation.definition.string.end.php
908
+ name: string.regexp.single-quoted.php
909
+ patterns:
910
+ - captures:
911
+ '1':
912
+ name: punctuation.definition.arbitrary-repitition.php
913
+ '3':
914
+ name: punctuation.definition.arbitrary-repitition.php
915
+ match: (\{)\d+(,\d+)?(\})
916
+ name: string.regexp.arbitrary-repitition.php
917
+ - comment: Escaped from the regexp – there can also be 2 backslashes (since 1
918
+ will escape the first)
919
+ match: (\\){1,2}[.$^\[\]{}]
920
+ name: constant.character.escape.regex.php
921
+ - comment: Escaped from the PHP string – there can also be 2 backslashes (since
922
+ 1 will escape the first)
923
+ match: \\{1,2}[\\']
924
+ name: constant.character.escape.php
925
+ - begin: \[(?:\^?\])?
926
+ captures:
927
+ '0':
928
+ name: punctuation.definition.character-class.php
929
+ end: \]
930
+ name: string.regexp.character-class.php
931
+ patterns:
932
+ - match: \\[\\'\[\]]
933
+ name: constant.character.escape.php
934
+ - match: ! '[$^+*]'
935
+ name: keyword.operator.regexp.php
936
+ sql-string-double-quoted:
937
+ begin: ! '"\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)\b)'
938
+ beginCaptures:
939
+ '0':
940
+ name: punctuation.definition.string.begin.php
941
+ contentName: source.sql.embedded.php
942
+ end: ! '"'
943
+ endCaptures:
944
+ '0':
945
+ name: punctuation.definition.string.end.php
946
+ name: string.quoted.double.sql.php
947
+ patterns:
948
+ - match: ! '#(\\"|[^"])*(?="|$\n?)'
949
+ name: comment.line.number-sign.sql
950
+ - match: --(\\"|[^"])*(?="|$\n?)
951
+ name: comment.line.double-dash.sql
952
+ - match: \\[\\"`']
953
+ name: constant.character.escape.php
954
+ - comment: ! "Unclosed strings must be captured to avoid them eating the remainder
955
+ of the PHP script\n\t\t\t\t\tSample case: $sql = \"SELECT * FROM bar WHERE
956
+ foo = '\" . $variable . \"'\""
957
+ match: ! '''(?=((\\'')|[^''"])*("|$))'
958
+ name: string.quoted.single.unclosed.sql
959
+ - comment: ! "Unclosed strings must be captured to avoid them eating the remainder
960
+ of the PHP script\n\t\t\t\t\tSample case: $sql = \"SELECT * FROM bar WHERE
961
+ foo = '\" . $variable . \"'\""
962
+ match: ! '`(?=((\\`)|[^`"])*("|$))'
963
+ name: string.quoted.other.backtick.unclosed.sql
964
+ - begin: ! ''''
965
+ end: ! ''''
966
+ name: string.quoted.single.sql
967
+ patterns:
968
+ - include: ! '#interpolation'
969
+ - begin: ! '`'
970
+ end: ! '`'
971
+ name: string.quoted.other.backtick.sql
972
+ patterns:
973
+ - include: ! '#interpolation'
974
+ - include: ! '#interpolation'
975
+ - include: source.sql
976
+ sql-string-single-quoted:
977
+ begin: ! '''\s*(?=(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER)\b)'
978
+ beginCaptures:
979
+ '0':
980
+ name: punctuation.definition.string.begin.php
981
+ contentName: source.sql.embedded.php
982
+ end: ! ''''
983
+ endCaptures:
984
+ '0':
985
+ name: punctuation.definition.string.end.php
986
+ name: string.quoted.single.sql.php
987
+ patterns:
988
+ - match: ! '#(\\''|[^''])*(?=''|$\n?)'
989
+ name: comment.line.number-sign.sql
990
+ - match: --(\\'|[^'])*(?='|$\n?)
991
+ name: comment.line.double-dash.sql
992
+ - match: \\[\\'`"]
993
+ name: constant.character.escape.php
994
+ - comment: ! "Unclosed strings must be captured to avoid them eating the remainder
995
+ of the PHP script\n\t\t\t\t\tSample case: $sql = \"SELECT * FROM bar WHERE
996
+ foo = '\" . $variable . \"'\""
997
+ match: ! '`(?=((\\`)|[^`''])*(''|$))'
998
+ name: string.quoted.other.backtick.unclosed.sql
999
+ - comment: ! "Unclosed strings must be captured to avoid them eating the remainder
1000
+ of the PHP script\n\t\t\t\t\tSample case: $sql = \"SELECT * FROM bar WHERE
1001
+ foo = '\" . $variable . \"'\""
1002
+ match: ! '"(?=((\\")|[^"''])*(''|$))'
1003
+ name: string.quoted.double.unclosed.sql
1004
+ - include: source.sql
1005
+ string-backtick:
1006
+ begin: ! '`'
1007
+ beginCaptures:
1008
+ '0':
1009
+ name: punctuation.definition.string.begin.php
1010
+ end: ! '`'
1011
+ endCaptures:
1012
+ '0':
1013
+ name: punctuation.definition.string.end.php
1014
+ name: string.interpolated.php
1015
+ patterns:
1016
+ - match: \\.
1017
+ name: constant.character.escape.php
1018
+ - include: ! '#interpolation'
1019
+ string-double-quoted:
1020
+ begin: ! '"'
1021
+ beginCaptures:
1022
+ '0':
1023
+ name: punctuation.definition.string.begin.php
1024
+ comment: This contentName is just to allow the usage of “select scope” to select
1025
+ the string contents first, then the string with quotes
1026
+ contentName: meta.string-contents.quoted.double.php
1027
+ end: ! '"'
1028
+ endCaptures:
1029
+ '0':
1030
+ name: punctuation.definition.string.end.php
1031
+ name: string.quoted.double.php
1032
+ patterns:
1033
+ - include: ! '#interpolation'
1034
+ string-single-quoted:
1035
+ begin: ! ''''
1036
+ beginCaptures:
1037
+ '0':
1038
+ name: punctuation.definition.string.begin.php
1039
+ contentName: meta.string-contents.quoted.single.php
1040
+ end: ! ''''
1041
+ endCaptures:
1042
+ '0':
1043
+ name: punctuation.definition.string.end.php
1044
+ name: string.quoted.single.php
1045
+ patterns:
1046
+ - match: \\[\\']
1047
+ name: constant.character.escape.php
1048
+ strings:
1049
+ patterns:
1050
+ - include: ! '#regex-double-quoted'
1051
+ - include: ! '#sql-string-double-quoted'
1052
+ - include: ! '#string-double-quoted'
1053
+ - include: ! '#regex-single-quoted'
1054
+ - include: ! '#sql-string-single-quoted'
1055
+ - include: ! '#string-single-quoted'
1056
+ support:
1057
+ patterns:
1058
+ - match: (?i)\bapc_(s(tore|ma_info)|c(ompile_file|lear_cache|a(s|che_info))|inc|de(c|fine_constants|lete(_file)?)|exists|fetch|load_constants|add|bin_(dump(file)?|load(file)?))\b
1059
+ name: support.function.apc.php
1060
+ - match: (?i)\b(s(huffle|izeof|ort)|n(ext|at(sort|casesort))|c(o(unt|mpact)|urrent)|in_array|u(sort|ksort|asort)|p(os|rev)|e(nd|ach|xtract)|k(sort|ey|rsort)|list|a(sort|r(sort|ray(_(s(hift|um|plice|earch|lice)|c(h(unk|ange_key_case)|o(unt_values|mbine))|intersect(_(u(key|assoc)|key|assoc))?|diff(_(u(key|assoc)|key|assoc))?|u(n(shift|ique)|intersect(_(uassoc|assoc))?|diff(_(uassoc|assoc))?)|p(op|ush|ad|roduct)|values|key(s|_exists)|f(il(ter|l(_keys)?)|lip)|walk(_recursive)?|r(e(duce|place(_recursive)?|verse)|and)|m(ultisort|erge(_recursive)?|ap)))?))|r(sort|eset|ange))\b
1061
+ name: support.function.array.php
1062
+ - match: (?i)\b(s(how_source|ys_getloadavg|leep)|highlight_(string|file)|con(stant|nection_(status|timeout|aborted))|time_(sleep_until|nanosleep)|ignore_user_abort|d(ie|efine(d)?)|u(sleep|n(iqid|pack))|__halt_compiler|p(hp_(strip_whitespace|check_syntax)|ack)|e(val|xit)|get_browser)\b
1063
+ name: support.function.basic_functions.php
1064
+ - match: (?i)\bbc(s(cale|ub|qrt)|comp|div|pow(mod)?|add|m(od|ul))\b
1065
+ name: support.function.bcmath.php
1066
+ - match: (?i)\bbz(c(ompress|lose)|open|decompress|err(str|no|or)|flush|write|read)\b
1067
+ name: support.function.bz2.php
1068
+ - match: (?i)\b(GregorianToJD|cal_(to_jd|info|days_in_month|from_jd)|unixtojd|jdto(unix|jewish)|easter_da(ys|te)|J(ulianToJD|ewishToJD|D(MonthName|To(Gregorian|Julian|French)|DayOfWeek))|FrenchToJD)\b
1069
+ name: support.function.calendar.php
1070
+ - match: (?i)\b(c(lass_(exists|alias)|all_user_method(_array)?)|i(s_(subclass_of|a)|nterface_exists)|property_exists|get_(c(lass(_(vars|methods))?|alled_class)|object_vars|declared_(classes|interfaces)|parent_class)|method_exists)\b
1071
+ name: support.function.classobj.php
1072
+ - match: (?i)\b(com_(set|create_guid|i(senum|nvoke)|pr(int_typeinfo|op(set|put|get))|event_sink|load(_typelib)?|addref|release|get(_active_object)?|message_pump)|variant_(s(ub|et(_type)?)|n(ot|eg)|c(a(st|t)|mp)|i(nt|div|mp)|or|d(iv|ate_(to_timestamp|from_timestamp))|pow|eqv|fix|a(nd|dd|bs)|round|get_type|xor|m(od|ul)))\b
1073
+ name: support.function.com.php
1074
+ - match: (?i)\bctype_(space|cntrl|digit|upper|p(unct|rint)|lower|al(num|pha)|graph|xdigit)\b
1075
+ name: support.function.ctype.php
1076
+ - match: (?i)\bcurl_(setopt(_array)?|c(opy_handle|lose)|init|e(rr(no|or)|xec)|version|getinfo|multi_(select|close|in(it|fo_read)|exec|add_handle|remove_handle|getcontent))\b
1077
+ name: support.function.curl.php
1078
+ - match: (?i)\b(str(totime|ptime|ftime)|checkdate|time(zone_(name_(from_abbr|get)|transitions_get|identifiers_list|o(pen|ffset_get)|version_get|location_get|abbreviations_list))?|idate|date(_(su(n(set|_info|rise)|b)|create(_from_format)?|time(stamp_(set|get)|zone_(set|get)|_set)|i(sodate_set|nterval_(create_from_date_string|format))|offset_get|d(iff|efault_timezone_(set|get)|ate_set)|parse(_from_format)?|format|add|get_last_errors|modify))?|localtime|g(et(timeofday|date)|m(strftime|date|mktime))|m(icrotime|ktime))\b
1079
+ name: support.function.datetime.php
1080
+ - match: (?i)\bdba_(sync|handlers|nextkey|close|insert|op(timize|en)|delete|popen|exists|key_split|f(irstkey|etch)|list|replace)\b
1081
+ name: support.function.dba.php
1082
+ - match: (?i)\bdbx_(sort|c(o(nnect|mpare)|lose)|e(scape_string|rror)|query|fetch_row)\b
1083
+ name: support.function.dbx.php
1084
+ - match: (?i)\b(scandir|c(h(dir|root)|losedir)|opendir|dir|re(winddir|addir)|getcwd)\b
1085
+ name: support.function.dir.php
1086
+ - match: (?i)\b(domxml_(new_doc|open_(file|mem)|version|x(slt_(stylesheet(_(doc|file))?|version)|mltree))|xp(tr_(new_context|eval)|ath_(new_context|eval(_expression)?|register_ns(_auto)?)))\b
1087
+ name: support.function.domxml.php
1088
+ - match: (?i)\bdotnet_load\b
1089
+ name: support.function.dotnet.php
1090
+ - match: (?i)\benchant_(dict_(s(tore_replacement|uggest)|check|is_in_session|describe|quick_check|add_to_(session|personal)|get_error)|broker_(set_ordering|init|d(ict_exists|escribe)|free(_dict)?|list_dicts|request_(dict|pwl_dict)|get_error))\b
1091
+ name: support.function.enchant.php
1092
+ - match: (?i)\b(s(plit(i)?|ql_regcase)|ereg(i(_replace)?|_replace)?)\b
1093
+ name: support.function.ereg.php
1094
+ - match: (?i)\b(set_e(rror_handler|xception_handler)|trigger_error|debug_(print_backtrace|backtrace)|user_error|error_(log|reporting|get_last)|restore_e(rror_handler|xception_handler))\b
1095
+ name: support.function.errorfunc.php
1096
+ - match: (?i)\b(s(hell_exec|ystem)|p(assthru|roc_(nice|close|terminate|open|get_status))|e(scapeshell(cmd|arg)|xec))\b
1097
+ name: support.function.exec.php
1098
+ - match: (?i)\b(exif_(t(humbnail|agname)|imagetype|read_data)|read_exif_data)\b
1099
+ name: support.function.exif.php
1100
+ - match: (?i)\b(s(ymlink|tat|et_file_buffer)|c(h(own|grp|mod)|opy|learstatcache)|t(ouch|empnam|mpfile)|is_(dir|uploaded_file|executable|file|writ(eable|able)|link|readable)|d(i(sk(_(total_space|free_space)|freespace)|rname)|elete)|u(nlink|mask)|p(close|open|a(thinfo|rse_ini_(string|file)))|f(s(canf|tat|eek)|nmatch|close|t(ell|runcate)|ile(size|ctime|type|inode|owner|_(put_contents|exists|get_contents)|perms|atime|group|mtime)?|open|p(ut(s|csv)|assthru)|eof|flush|write|lock|read|get(s(s)?|c(sv)?))|l(stat|ch(own|grp)|ink(info)?)|r(e(name|wind|a(d(file|link)|lpath(_cache_(size|get))?))|mdir)|glob|m(ove_uploaded_file|kdir)|basename)\b
1101
+ name: support.function.file.php
1102
+ - match: (?i)\b(finfo_(set_flags|close|open|file|buffer)|mime_content_type)\b
1103
+ name: support.function.fileinfo.php
1104
+ - match: (?i)\bfilter_(has_var|i(nput(_array)?|d)|var(_array)?|list)\b
1105
+ name: support.function.filter.php
1106
+ - match: (?i)\b(c(all_user_func(_array)?|reate_function)|unregister_tick_function|f(orward_static_call(_array)?|unc(tion_exists|_(num_args|get_arg(s)?)))|register_(shutdown_function|tick_function)|get_defined_functions)\b
1107
+ name: support.function.funchand.php
1108
+ - match: (?i)\b(ngettext|textdomain|d(ngettext|c(ngettext|gettext)|gettext)|gettext|bind(textdomain|_textdomain_codeset))\b
1109
+ name: support.function.gettext.php
1110
+ - match: (?i)\bgmp_(s(can(1|0)|trval|ign|ub|etbit|qrt(rem)?)|hamdist|ne(g|xtprime)|c(om|lrbit|mp)|testbit|in(tval|it|vert)|or|div(_(q(r)?|r)|exact)?|jacobi|p(o(pcount|w(m)?)|erfect_square|rob_prime)|fact|legendre|a(nd|dd|bs)|random|gcd(ext)?|xor|m(od|ul))\b
1111
+ name: support.function.gmp.php
1112
+ - match: (?i)\bhash(_(hmac(_file)?|copy|init|update(_(stream|file))?|fi(nal|le)|algos))?\b
1113
+ name: support.function.hash.php
1114
+ - match: (?i)\b(http_(s(upport|end_(st(atus|ream)|content_(type|disposition)|data|file|last_modified))|head|negotiate_(c(harset|ontent_type)|language)|c(hunked_decode|ache_(etag|last_modified))|throttle|inflate|d(eflate|ate)|p(ost_(data|fields)|ut_(stream|data|file)|ersistent_handles_(c(ount|lean)|ident)|arse_(headers|cookie|params|message))|re(direct|quest(_(method_(name|unregister|exists|register)|body_encode))?)|get(_request_(headers|body(_stream)?))?|match_(etag|request_header|modified)|build_(str|cookie|url))|ob_(inflatehandler|deflatehandler|etaghandler))\b
1115
+ name: support.function.http.php
1116
+ - match: (?i)\b(iconv(_(s(tr(pos|len|rpos)|ubstr|et_encoding)|get_encoding|mime_(decode(_headers)?|encode)))?|ob_iconv_handler)\b
1117
+ name: support.function.iconv.php
1118
+ - match: (?i)\biis_(s(t(op_serv(ice|er)|art_serv(ice|er))|et_(s(cript_map|erver_rights)|dir_security|app_settings))|add_server|remove_server|get_(s(cript_map|erv(ice_state|er_(rights|by_(comment|path))))|dir_security))\b
1119
+ name: support.function.iisfunc.php
1120
+ - match: (?i)\b(i(ptc(parse|embed)|mage(s(y|tring(up)?|et(style|t(hickness|ile)|pixel|brush)|avealpha|x)|c(har(up)?|o(nvolution|py(res(ized|ampled)|merge(gray)?)?|lor(s(total|et|forindex)|closest(hwb|alpha)?|transparent|deallocate|exact(alpha)?|a(t|llocate(alpha)?)|resolve(alpha)?|match))|reate(truecolor|from(string|jpeg|png|wbmp|g(if|d(2(part)?)?)|x(pm|bm)))?)|t(ypes|tf(text|bbox)|ruecolortopalette)|i(struecolor|nterlace)|2wbmp|d(estroy|ashedline)|jpeg|_type_to_(extension|mime_type)|p(s(slantfont|text|e(ncodefont|xtendfont)|freefont|loadfont|bbox)|ng|olygon|alettecopy)|ellipse|f(t(text|bbox)|il(ter|l(toborder|ed(polygon|ellipse|arc|rectangle))?)|ont(height|width))|wbmp|l(ine|oadfont|ayereffect)|a(ntialias|lphablending|rc)|r(otate|ectangle)|g(if|d(2)?|ammacorrect|rab(screen|window))|xbm))|jpeg2wbmp|png2wbmp|g(d_info|etimagesize))\b
1121
+ name: support.function.image.php
1122
+ - match: (?i)\b(s(ys_get_temp_dir|et_(time_limit|include_path|magic_quotes_runtime))|ini_(set|alter|restore|get(_all)?)|zend_(thread_id|version|logo_guid)|dl|p(hp(credits|info|_(sapi_name|ini_(scanned_files|loaded_file)|uname|logo_guid)|version)|utenv)|extension_loaded|version_compare|assert(_options)?|restore_include_path|g(c_(collect_cycles|disable|enable(d)?)|et(opt|_(c(urrent_user|fg_var)|include(d_files|_path)|defined_constants|extension_funcs|loaded_extensions|required_files|magic_quotes_(runtime|gpc))|env|lastmod|rusage|my(inode|uid|pid|gid)))|m(emory_get_(usage|peak_usage)|a(in|gic_quotes_runtime)))\b
1123
+ name: support.function.info.php
1124
+ - match: (?i)\bibase_(se(t_event_handler|rv(ice_(detach|attach)|er_info))|n(um_(params|fields)|ame_result)|c(o(nnect|mmit(_ret)?)|lose)|t(imefmt|rans)|d(elete_user|rop_db|b_info)|p(connect|aram_info|repare)|e(rr(code|msg)|xecute)|query|f(ield_info|etch_(object|assoc|row)|ree_(event_handler|query|result))|wait_event|a(dd_user|ffected_rows)|r(ollback(_ret)?|estore)|gen_id|m(odify_user|aintain_db)|b(lob_(c(lose|ancel|reate)|i(nfo|mport)|open|echo|add|get)|ackup))\b
1125
+ name: support.function.interbase.php
1126
+ - match: (?i)\b(n(ormalizer_(normalize|is_normalized)|umfmt_(set_(symbol|text_attribute|pattern|attribute)|create|parse(_currency)?|format(_currency)?|get_(symbol|text_attribute|pattern|error_(code|message)|locale|attribute)))|collator_(s(ort(_with_sort_keys)?|et_(strength|attribute))|c(ompare|reate)|asort|get_(s(trength|ort_key)|error_(code|message)|locale|attribute))|transliterator_(create(_(inverse|from_rules))?|transliterate|list_ids|get_error_(code|message))|i(ntl_(is_failure|error_name|get_error_(code|message))|dn_to_(u(nicode|tf8)|ascii))|datefmt_(set_(calendar|timezone_id|pattern|lenient)|create|is_lenient|parse|format|localtime|get_(calendar|time(type|zone_id)|datetype|pattern|error_(code|message)|locale))|locale_(set_default|compose|parse|filter_matches|lookup|accept_from_http|get_(script|d(isplay_(script|name|variant|language|region)|efault)|primary_language|keywords|all_variants|region))|resourcebundle_(c(ount|reate)|locales|get(_error_(code|message))?)|grapheme_(s(tr(str|i(str|pos)|pos|len|r(ipos|pos))|ubstr)|extract)|msgfmt_(set_pattern|create|parse(_message)?|format(_message)?|get_(pattern|error_(code|message)|locale)))\b
1127
+ name: support.function.intl.php
1128
+ - match: (?i)\bjson_(decode|encode|last_error)\b
1129
+ name: support.function.json.php
1130
+ - match: (?i)\bldap_(s(tart_tls|ort|e(t_(option|rebind_proc)|arch)|asl_bind)|next_(entry|attribute|reference)|c(o(nnect|unt_entries|mpare)|lose)|t61_to_8859|d(n2ufn|elete)|8859_to_t61|unbind|parse_re(sult|ference)|e(rr(no|2str|or)|xplode_dn)|f(irst_(entry|attribute|reference)|ree_result)|list|add|re(name|ad)|get_(option|dn|entries|values(_len)?|attributes)|mod(ify|_(del|add|replace))|bind)\b
1131
+ name: support.function.ldap.php
1132
+ - match: (?i)\blibxml_(set_streams_context|clear_errors|disable_entity_loader|use_internal_errors|get_(errors|last_error))\b
1133
+ name: support.function.libxml.php
1134
+ - match: (?i)\b(ezmlm_hash|mail)\b
1135
+ name: support.function.mail.php
1136
+ - match: (?i)\b(s(in(h)?|qrt|rand)|h(ypot|exdec)|c(os(h)?|eil)|tan(h)?|is_(nan|infinite|finite)|octdec|de(c(hex|oct|bin)|g2rad)|p(i|ow)|exp(m1)?|f(loor|mod)|l(cg_value|og(1(p|0))?)|a(sin(h)?|cos(h)?|tan(h|2)?|bs)|r(ound|a(nd|d2deg))|getrandmax|m(t_(srand|rand|getrandmax)|in|ax)|b(indec|ase_convert))\b
1137
+ name: support.function.math.php
1138
+ - match: (?i)\bmb_(s(tr(str|cut|to(upper|lower)|i(str|pos|mwidth)|pos|width|len|r(chr|i(chr|pos)|pos))|ubst(itute_character|r(_count)?)|plit|end_mail)|http_(input|output)|c(heck_encoding|onvert_(case|encoding|variables|kana))|internal_encoding|output_handler|de(code_(numericentity|mimeheader)|tect_(order|encoding))|p(arse_str|referred_mime_name)|e(ncod(ing_aliases|e_(numericentity|mimeheader))|reg(i(_replace)?|_(search(_(setpos|init|pos|regs|get(pos|regs)))?|replace|match))?)|l(ist_encodings|anguage)|regex_(set_options|encoding)|get_info)\b
1139
+ name: support.function.mbstring.php
1140
+ - match: (?i)\bm(crypt_(c(fb|reate_iv|bc)|ofb|decrypt|e(nc(_(self_test|is_block_(algorithm(_mode)?|mode)|get_(supported_key_sizes|iv_size|key_size|algorithms_name|modes_name|block_size))|rypt)|cb)|list_(algorithms|modes)|ge(neric(_(init|deinit|end))?|t_(cipher_name|iv_size|key_size|block_size))|module_(self_test|close|is_block_(algorithm(_mode)?|mode)|open|get_(supported_key_sizes|algo_(key_size|block_size))))|decrypt_generic)\b
1141
+ name: support.function.mcrypt.php
1142
+ - match: (?i)\bmemcache_debug\b
1143
+ name: support.function.memcache.php
1144
+ - match: (?i)\bmhash(_(count|keygen_s2k|get_(hash_name|block_size)))?\b
1145
+ name: support.function.mhash.php
1146
+ - match: (?i)\bbson_(decode|encode)\b
1147
+ name: support.function.mongo.php
1148
+ - match: (?i)\bmysql_(s(tat|e(t_charset|lect_db))|num_(fields|rows)|c(onnect|l(ient_encoding|ose)|reate_db)|t(hread_id|ablename)|in(sert_id|fo)|d(ata_seek|rop_db|b_(name|query))|unbuffered_query|p(connect|ing)|e(scape_string|rr(no|or))|query|f(ield_(seek|name|t(ype|able)|flags|len)|etch_(object|field|lengths|a(ssoc|rray)|row)|ree_result)|list_(tables|dbs|processes|fields)|affected_rows|re(sult|al_escape_string)|get_(server_info|host_info|client_info|proto_info))\b
1149
+ name: support.function.mysql.php
1150
+ - match: (?i)\bmysqli_(s(sl_set|t(ore_result|at|mt_(s(tore_result|end_long_data|qlstate)|num_rows|close|in(sert_id|it)|data_seek|p(aram_count|repare)|e(rr(no|or)|xecute)|f(ield_count|etch|ree_result)|a(ttr_(set|get)|ffected_rows)|res(ult_metadata|et)|get_(warnings|result)|bind_(param|result)))|e(nd_(query|long_data)|t_(charset|opt|local_infile_(handler|default))|lect_db)|qlstate|lave_query)|n(um_(fields|rows)|ext_result)|c(ha(nge_user|racter_set_name)|o(nnect(_err(no|or))?|mmit)|l(ient_encoding|ose))|thread_(safe|id)|in(sert_id|it|fo)|options|d(isable_r(pl_parse|eads_from_master)|ump_debug_info|ebug|ata_seek)|use_result|p(ing|oll|aram_count|repare)|e(scape_string|nable_r(pl_parse|eads_from_master)|rr(no|or)|xecute|mbedded_server_(start|end))|kill|query|f(ield_(seek|count|tell)|etch(_(object|field(s|_direct)?|lengths|a(ssoc|ll|rray)|row))?|ree_result)|warning_count|a(utocommit|ffected_rows)|r(ollback|pl_(p(arse_enabled|robe)|query_type)|e(port|a(p_async_query|l_(connect|escape_string|query))))|get_(server_(info|version)|host_info|c(harset|onnection_stats|lient_(stats|info|version)|ache_stats)|proto_info|warnings|metadata)|m(ore_results|ulti_query|aster_query)|bind_(param|result))\b
1151
+ name: support.function.mysqli.php
1152
+ - match: (?i)\bmysqlnd_ms_(set_user_pick_server|query_is_select|get_stats)\b
1153
+ name: support.function.mysqlnd-ms.php
1154
+ - match: (?i)\bmysqlnd_qc_(set_user_handlers|c(hange_handler|lear_cache)|get_(handler|c(ore_stats|ache_info)|query_trace_log))\b
1155
+ name: support.function.mysqlnd-qc.php
1156
+ - match: (?i)\b(s(yslog|ocket_(set_(timeout|blocking)|get_status)|et(cookie|rawcookie))|header(s_(sent|list)|_remove)?|c(heckdnsrr|loselog)|i(net_(ntop|pton)|p2long)|openlog|d(ns_(check_record|get_(record|mx))|efine_syslog_variables)|pfsockopen|fsockopen|long2ip|get(servby(name|port)|host(name|by(name(l)?|addr))|protobyn(umber|ame)|mxrr))\b
1157
+ name: support.function.network.php
1158
+ - match: (?i)\bnsapi_(virtual|re(sponse_headers|quest_headers))\b
1159
+ name: support.function.nsapi.php
1160
+ - match: (?i)\b(deaggregate|aggregat(ion_info|e(_(info|properties(_by_(list|regexp))?|methods(_by_(list|regexp))?))?))\b
1161
+ name: support.function.objaggregation.php
1162
+ - match: (?i)\boci(s(tatementtype|e(tprefetch|rverversion)|avelob(file)?)|n(umcols|ew(c(ollection|ursor)|descriptor)|logon)|c(o(l(umn(s(cale|ize)|name|type(raw)?|isnull|precision)|l(size|trim|a(ssign(elem)?|ppend)|getelem|max))|mmit)|loselob|ancel)|internaldebug|definebyname|_(s(tatement_type|e(t_(client_i(nfo|dentifier)|prefetch|edition|action|module_name)|rver_version))|n(um_(fields|rows)|ew_(c(o(nnect|llection)|ursor)|descriptor))|c(o(nnect|mmit)|l(ient_version|ose)|ancel)|internal_debug|define_by_name|p(connect|a(ssword_change|rse))|e(rror|xecute)|f(ield_(s(cale|ize)|name|type(_raw)?|is_null|precision)|etch(_(object|a(ssoc|ll|rray)|row))?|ree_statement)|lob_(copy|is_equal)|r(ollback|esult)|bind_(array_by_name|by_name))|p(logon|arse)|e(rror|xecute)|f(etch(statement|into)?|ree(statement|c(ollection|ursor)|desc))|write(temporarylob|lobtofile)|lo(adlob|go(n|ff))|r(o(wcount|llback)|esult)|bindbyname)\b
1163
+ name: support.function.oci8.php
1164
+ - match: (?i)\bopenssl_(s(ign|eal)|c(sr_(sign|new|export(_to_file)?|get_(subject|public_key))|ipher_iv_length)|open|d(h_compute_key|igest|ecrypt)|p(ublic_(decrypt|encrypt)|k(cs(12_(export(_to_file)?|read)|7_(sign|decrypt|encrypt|verify))|ey_(new|export(_to_file)?|free|get_(details|p(ublic|rivate))))|rivate_(decrypt|encrypt))|e(ncrypt|rror_string)|verify|free_key|random_pseudo_bytes|get_(cipher_methods|p(ublickey|rivatekey)|md_methods)|x509_(check(_private_key|purpose)|parse|export(_to_file)?|free|read))\b
1165
+ name: support.function.openssl.php
1166
+ - match: (?i)\b(o(utput_(add_rewrite_var|reset_rewrite_vars)|b_(start|clean|implicit_flush|end_(clean|flush)|flush|list_handlers|g(zhandler|et_(status|c(ontents|lean)|flush|le(ngth|vel)))))|flush)\b
1167
+ name: support.function.output.php
1168
+ - match: (?i)\boverload\b
1169
+ name: support.function.overload.php
1170
+ - match: (?i)\bpcntl_(s(ig(nal(_dispatch)?|timedwait|procmask|waitinfo)|etpriority)|exec|fork|w(stopsig|termsig|if(s(topped|ignaled)|exited)|exitstatus|ait(pid)?)|alarm|getpriority)\b
1171
+ name: support.function.pcntl.php
1172
+ - match: (?i)\bpg_(se(nd_(prepare|execute|query(_params)?)|t_(client_encoding|error_verbosity)|lect)|host|num_(fields|rows)|c(o(n(nect(ion_(status|reset|busy))?|vert)|py_(to|from))|l(ient_encoding|ose)|ancel_query)|t(ty|ra(nsaction_status|ce))|insert|options|d(elete|bname)|u(n(trace|escape_bytea)|pdate)|p(connect|ing|ort|ut_line|arameter_status|repare)|e(scape_(string|bytea)|nd_copy|xecute)|version|query(_params)?|f(ield_(size|n(um|ame)|t(ype(_oid)?|able)|is_null|prtlen)|etch_(object|a(ssoc|ll(_columns)?|rray)|r(ow|esult))|ree_result)|l(o_(seek|c(lose|reate)|tell|import|open|unlink|export|write|read(_all)?)|ast_(notice|oid|error))|affected_rows|result_(s(tatus|eek)|error(_field)?)|get_(notify|pid|result)|meta_data)\b
1173
+ name: support.function.pgsql.php
1174
+ - match: (?i)\b(virtual|apache_(setenv|note|child_terminate|lookup_uri|re(s(ponse_headers|et_timeout)|quest_headers)|get(_(version|modules)|env))|getallheaders)\b
1175
+ name: support.function.php_apache.php
1176
+ - match: (?i)\bdom_import_simplexml\b
1177
+ name: support.function.php_dom.php
1178
+ - match: (?i)\bftp_(s(sl_connect|ystype|i(te|ze)|et_option)|n(list|b_(continue|put|f(put|get)|get))|c(h(dir|mod)|onnect|dup|lose)|delete|p(ut|wd|asv)|exec|quit|f(put|get)|login|alloc|r(ename|aw(list)?|mdir)|get(_option)?|m(dtm|kdir))\b
1179
+ name: support.function.php_ftp.php
1180
+ - match: (?i)\bimap_(s(can(mailbox)?|tatus|ort|ubscribe|e(t(_quota|flag_full|acl)|arch)|avebody)|header(s|info)?|num_(recent|msg)|c(heck|l(ose|earflag_full)|reate(mailbox)?)|t(hread|imeout)|open|delete(mailbox)?|8bit|u(n(subscribe|delete)|tf(7_(decode|encode)|8)|id)|ping|e(rrors|xpunge)|qprint|fetch(structure|header|text|_overview|mime|body)|l(sub|ist(s(can|ubscribed)|mailbox)?|ast_error)|a(ppend|lerts)|r(e(name(mailbox)?|open)|fc822_(parse_(headers|adrlist)|write_address))|g(c|et(subscribed|_quota(root)?|acl|mailboxes))|m(sgno|ime_header_decode|ail(_(co(py|mpose)|move)|boxmsginfo)?)|b(inary|ody(struct)?|ase64))\b
1181
+ name: support.function.php_imap.php
1182
+ - match: (?i)\bmssql_(select_db|n(um_(fields|rows)|ext_result)|c(onnect|lose)|init|data_seek|pconnect|execute|query|f(ield_(seek|name|type|length)|etch_(object|field|a(ssoc|rray)|row|batch)|ree_(statement|result))|r(ows_affected|esult)|g(uid_string|et_last_message)|min_(error_severity|message_severity)|bind)\b
1183
+ name: support.function.php_mssql.php
1184
+ - match: (?i)\bodbc_(s(tatistics|pecialcolumns|etoption)|n(um_(fields|rows)|ext_result)|c(o(nnect|lumn(s|privileges)|mmit)|ursor|lose(_all)?)|table(s|privileges)|d(o|ata_source)|p(connect|r(imarykeys|ocedure(s|columns)|epare))|e(rror(msg)?|xec(ute)?)|f(ield_(scale|n(um|ame)|type|precision|len)|oreignkeys|etch_(into|object|array|row)|ree_result)|longreadlen|autocommit|r(ollback|esult(_all)?)|gettypeinfo|binmode)\b
1185
+ name: support.function.php_odbc.php
1186
+ - match: (?i)\bpreg_(split|quote|filter|last_error|replace(_callback)?|grep|match(_all)?)\b
1187
+ name: support.function.php_pcre.php
1188
+ - match: (?i)\b(spl_(classes|object_hash|autoload(_(call|unregister|extensions|functions|register))?)|class_(implements|parents)|iterator_(count|to_array|apply))\b
1189
+ name: support.function.php_spl.php
1190
+ - match: (?i)\bzip_(close|open|entry_(name|c(ompress(ionmethod|edsize)|lose)|open|filesize|read)|read)\b
1191
+ name: support.function.php_zip.php
1192
+ - match: (?i)\bposix_(s(trerror|et(sid|uid|pgid|e(uid|gid)|gid))|ctermid|t(tyname|imes)|i(satty|nitgroups)|uname|errno|kill|access|get(sid|cwd|uid|_last_error|p(id|pid|w(nam|uid)|g(id|rp))|e(uid|gid)|login|rlimit|g(id|r(nam|oups|gid)))|mk(nod|fifo))\b
1193
+ name: support.function.posix.php
1194
+ - match: (?i)\bset(threadtitle|proctitle)\b
1195
+ name: support.function.proctitle.php
1196
+ - match: (?i)\bpspell_(s(tore_replacement|uggest|ave_wordlist)|new(_(config|personal))?|c(heck|onfig_(save_repl|create|ignore|d(ict_dir|ata_dir)|personal|r(untogether|epl)|mode)|lear_session)|add_to_(session|personal))\b
1197
+ name: support.function.pspell.php
1198
+ - match: (?i)\breadline(_(c(ompletion_function|lear_history|allback_(handler_(install|remove)|read_char))|info|on_new_line|write_history|list_history|add_history|re(display|ad_history)))?\b
1199
+ name: support.function.readline.php
1200
+ - match: (?i)\brecode(_(string|file))?\b
1201
+ name: support.function.recode.php
1202
+ - match: (?i)\brrd_(create|tune|info|update|error|f(irst|etch)|last(update)?|restore|graph|xport)\b
1203
+ name: support.function.rrd.php
1204
+ - match: (?i)\b(s(hm_(has_var|detach|put_var|attach|remove(_var)?|get_var)|em_(acquire|re(lease|move)|get))|ftok|msg_(s(tat_queue|e(nd|t_queue))|queue_exists|re(ceive|move_queue)|get_queue))\b
1205
+ name: support.function.sem.php
1206
+ - match: (?i)\bsession_(s(tart|et_(save_handler|cookie_params)|ave_path)|name|c(ommit|ache_(expire|limiter))|i(s_registered|d)|de(stroy|code)|un(set|register)|encode|write_close|reg(ister|enerate_id)|get_cookie_params|module_name)\b
1207
+ name: support.function.session.php
1208
+ - match: (?i)\bshmop_(size|close|open|delete|write|read)\b
1209
+ name: support.function.shmop.php
1210
+ - match: (?i)\bsimplexml_(import_dom|load_(string|file))\b
1211
+ name: support.function.simplexml.php
1212
+ - match: (?i)\bsnmp(set|2_(set|walk|real_walk|get(next)?)|_(set_(oid_(numeric_print|output_format)|enum_print|valueretrieval|quick_print)|read_mib|get_(valueretrieval|quick_print))|3_(set|walk|real_walk|get(next)?)|walk(oid)?|realwalk|get(next)?)\b
1213
+ name: support.function.snmp.php
1214
+ - match: (?i)\b(is_soap_fault|use_soap_error_handler)\b
1215
+ name: support.function.soap.php
1216
+ - match: (?i)\bsocket_(s(hutdown|trerror|e(nd(to)?|t_(nonblock|option|block)|lect))|c(onnect|l(ose|ear_error)|reate(_(pair|listen))?)|write|l(isten|ast_error)|accept|re(cv(from)?|ad)|get(sockname|_option|peername)|bind)\b
1217
+ name: support.function.sockets.php
1218
+ - match: (?i)\bsqlite_(s(ingle_query|eek)|has_(prev|more)|n(um_(fields|rows)|ext)|c(hanges|olumn|urrent|lose|reate_(function|aggregate))|open|u(nbuffered_query|df_(decode_binary|encode_binary))|p(open|rev)|e(scape_string|rror_string|xec)|valid|key|query|f(ield_name|etch_(s(tring|ingle)|column_types|object|a(ll|rray))|actory)|l(ib(encoding|version)|ast_(insert_rowid|error))|array_query|rewind|busy_timeout)\b
1219
+ name: support.function.sqlite.php
1220
+ - match: (?i)\bstats_(s(ta(ndard_deviation|t_(noncentral_t|correlation|in(nerproduct|dependent_t)|p(owersum|ercentile|aired_t)|gennch|binomial_coef))|kew)|harmonic_mean|c(ovariance|df_(n(oncentral_(chisquare|f)|egative_binomial)|c(hisquare|auchy)|t|uniform|poisson|exponential|f|weibull|l(ogistic|aplace)|gamma|b(inomial|eta)))|den(s_(n(ormal|egative_binomial)|c(hisquare|auchy)|t|pmf_(hypergeometric|poisson|binomial)|exponential|f|weibull|l(ogistic|aplace)|gamma|beta)|_uniform)|variance|kurtosis|absolute_deviation|rand_(setall|phrase_to_seeds|ranf|ge(n_(no(ncen(tral_(t|f)|ral_chisquare)|rmal)|chisquare|t|i(nt|uniform|poisson|binomial(_negative)?)|exponential|f(uniform)?|gamma|beta)|t_seeds)))\b
1221
+ name: support.function.stats.php
1222
+ - match: (?i)\bs(tream_(s(ocket_(s(hutdown|e(ndto|rver))|client|pair|enable_crypto|accept|recvfrom|get_name)|upports_lock|e(t_(timeout|write_buffer|read_buffer|blocking)|lect))|notification_callback|co(ntext_(set_(option|default|params)|create|get_(options|default|params))|py_to_stream)|is_local|encoding|filter_(prepend|append|re(gister|move))|wrapper_(unregister|re(store|gister))|re(solve_include_path|gister_wrapper)|get_(contents|transports|filters|wrappers|line|meta_data)|bucket_(new|prepend|append|make_writeable))|et_socket_blocking)\b
1223
+ name: support.function.streamsfuncs.php
1224
+ - match: (?i)\b(s(scanf|ha1(_file)?|tr(s(tr|pn)|n(c(asecmp|mp)|atc(asecmp|mp))|c(spn|hr|oll|asecmp|mp)|t(o(upper|k|lower)|r)|i(str|p(slashes|cslashes|os|_tags))|_(s(huffle|plit)|ireplace|pad|word_count|r(ot13|ep(eat|lace))|getcsv)|p(os|brk)|len|r(chr|ipos|pos|ev))|imilar_text|oundex|ubstr(_(co(unt|mpare)|replace))?|printf|etlocale)|h(tml(specialchars(_decode)?|_entity_decode|entities)|ebrev(c)?)|n(umber_format|l(2br|_langinfo))|c(h(op|unk_split|r)|o(nvert_(cyr_string|uu(decode|encode))|unt_chars)|r(ypt|c32))|trim|implode|ord|uc(first|words)|join|p(arse_str|rint(f)?)|e(cho|xplode)|v(sprintf|printf|fprintf)|quote(d_printable_(decode|encode)|meta)|fprintf|wordwrap|l(cfirst|trim|ocaleconv|evenshtein)|add(slashes|cslashes)|rtrim|get_html_translation_table|m(oney_format|d5(_file)?|etaphone)|bin2hex)\b
1225
+ name: support.function.string.php
1226
+ - match: (?i)\bsybase_(se(t_message_handler|lect_db)|num_(fields|rows)|c(onnect|lose)|d(eadlock_retry_count|ata_seek)|unbuffered_query|pconnect|query|f(ield_seek|etch_(object|field|a(ssoc|rray)|row)|ree_result)|affected_rows|result|get_last_message|min_(server_severity|client_severity|error_severity|message_severity))\b
1227
+ name: support.function.sybase.php
1228
+ - match: (?i)\b(tidy_(s(et(opt|_encoding)|ave_config)|c(onfig_count|lean_repair)|is_x(html|ml)|diagnose|parse_(string|file)|error_count|warning_count|load_config|access_count|re(set_config|pair_(string|file))|get(opt|_(status|h(tml(_ver)?|ead)|config|o(utput|pt_doc)|error_buffer|r(oot|elease)|body)))|ob_tidyhandler)\b
1229
+ name: support.function.tidy.php
1230
+ - match: (?i)\btoken_(name|get_all)\b
1231
+ name: support.function.tokenizer.php
1232
+ - match: (?i)\b(http_build_query|url(decode|encode)|parse_url|rawurl(decode|encode)|get_(headers|meta_tags)|base64_(decode|encode))\b
1233
+ name: support.function.url.php
1234
+ - match: (?i)\b(s(trval|e(ttype|rialize))|i(s(set|_(s(calar|tring)|nu(ll|meric)|callable|int(eger)?|object|double|float|long|array|re(source|al)|bool))|ntval|mport_request_variables)|d(oubleval|ebug_zval_dump)|unse(t|rialize)|print_r|empty|var_(dump|export)|floatval|get(type|_(defined_vars|resource_type)))\b
1235
+ name: support.function.var.php
1236
+ - match: (?i)\bwddx_(serialize_va(lue|rs)|deserialize|packet_(start|end)|add_vars)\b
1237
+ name: support.function.wddx.php
1238
+ - match: (?i)\bxhprof_(sample_(disable|enable)|disable|enable)\b
1239
+ name: support.function.xhprof.php
1240
+ - match: (?i)\b(utf8_(decode|encode)|xml_(set_(start_namespace_decl_handler|notation_decl_handler|character_data_handler|object|default_handler|unparsed_entity_decl_handler|processing_instruction_handler|e(nd_namespace_decl_handler|lement_handler|xternal_entity_ref_handler))|parse(_into_struct|r_(set_option|create(_ns)?|free|get_option))?|error_string|get_(current_(column_number|line_number|byte_index)|error_code)))\b
1241
+ name: support.function.xml.php
1242
+ - match: (?i)\bxmlrpc_(se(t_type|rver_(c(all_method|reate)|destroy|add_introspection_data|register_(introspection_callback|method)))|is_fault|decode(_request)?|parse_method_descriptions|encode(_request)?|get_type)\b
1243
+ name: support.function.xmlrpc.php
1244
+ - match: (?i)\bxmlwriter_(s(tart_(c(omment|data)|d(td(_(e(ntity|lement)|attlist))?|ocument)|pi|element(_ns)?|attribute(_ns)?)|et_indent(_string)?)|text|o(utput_memory|pen_(uri|memory))|end_(c(omment|data)|d(td(_(e(ntity|lement)|attlist))?|ocument)|pi|element|attribute)|f(ull_end_element|lush)|write_(c(omment|data)|dtd(_(e(ntity|lement)|attlist))?|pi|element(_ns)?|attribute(_ns)?|raw))\b
1245
+ name: support.function.xmlwriter.php
1246
+ - match: (?i)\bxslt_(set(opt|_(s(cheme_handler(s)?|ax_handler(s)?)|object|e(ncoding|rror_handler)|log|base))|create|process|err(no|or)|free|getopt|backend_(name|info|version))\b
1247
+ name: support.function.xslt.php
1248
+ - match: (?i)\b(zlib_get_coding_type|readgzfile|gz(seek|c(ompress|lose)|tell|inflate|open|de(code|flate)|uncompress|p(uts|assthru)|e(ncode|of)|file|write|re(wind|ad)|get(s(s)?|c)))\b
1249
+ name: support.function.zlib.php
1250
+ - match: (?i)\bis_int(eger)?\b
1251
+ name: support.function.alias.php
1252
+ user-function-call:
1253
+ begin: (?i)(?=[a-z_0-9\\]*[a-z_][a-z0-9_]*\s*\()
1254
+ end: (?i)[a-z_][a-z_0-9]*(?=\s*\()
1255
+ name: meta.function-call.php
1256
+ patterns:
1257
+ - include: ! '#namespace'
1258
+ var_basic:
1259
+ patterns:
1260
+ - captures:
1261
+ '1':
1262
+ name: punctuation.definition.variable.php
1263
+ match: ! "(?x)\n \t\t\t (\\$+)[a-zA-Z_]\n \t\t\t
1264
+ \ [a-zA-Z0-9_]*?\\b"
1265
+ name: variable.other.php
1266
+ var_global:
1267
+ captures:
1268
+ '1':
1269
+ name: punctuation.definition.variable.php
1270
+ match: (\$)((_(COOKIE|FILES|GET|POST|REQUEST))|arg(v|c))\b
1271
+ name: variable.other.global.php
1272
+ var_global_safer:
1273
+ captures:
1274
+ '1':
1275
+ name: punctuation.definition.variable.php
1276
+ match: (\$)((GLOBALS|_(ENV|SERVER|SESSION)))
1277
+ name: variable.other.global.safer.php
1278
+ variable-name:
1279
+ patterns:
1280
+ - include: ! '#var_global'
1281
+ - include: ! '#var_global_safer'
1282
+ - captures:
1283
+ '1':
1284
+ name: variable.other.php
1285
+ '10':
1286
+ name: string.unquoted.index.php
1287
+ '11':
1288
+ name: punctuation.section.array.end.php
1289
+ '2':
1290
+ name: punctuation.definition.variable.php
1291
+ '4':
1292
+ name: keyword.operator.class.php
1293
+ '5':
1294
+ name: variable.other.property.php
1295
+ '6':
1296
+ name: punctuation.section.array.begin.php
1297
+ '7':
1298
+ name: constant.numeric.index.php
1299
+ '8':
1300
+ name: variable.other.index.php
1301
+ '9':
1302
+ name: punctuation.definition.variable.php
1303
+ comment: ! 'Simple syntax: $foo, $foo[0], $foo[$bar], $foo->bar'
1304
+ match: ! "(?x)\n\t\t\t\t\t\t((\\$)(?<name>[a-zA-Z_][a-zA-Z0-9_]*))\n\t\t\t\t\t\t(?:\n\t\t\t\t\t\t\t(->)(\\g<name>)\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<name>)|(\\w+))\n\t\t\t\t\t\t\t(\\])\n\t\t\t\t\t\t)?\n\t\t\t\t\t\t"
1305
+ - captures:
1306
+ '1':
1307
+ name: variable.other.php
1308
+ '2':
1309
+ name: punctuation.definition.variable.php
1310
+ '4':
1311
+ name: punctuation.definition.variable.php
1312
+ comment: ! 'Simple syntax with braces: "foo${bar}baz"'
1313
+ match: ! "(?x)\n\t\t\t\t\t\t((\\$\\{)(?<name>[a-zA-Z_][a-zA-Z0-9_]*)(\\}))\n\t\t\t\t\t\t"
1314
+ variables:
1315
+ patterns:
1316
+ - include: ! '#var_global'
1317
+ - include: ! '#var_global_safer'
1318
+ - include: ! '#var_basic'
1319
+ - begin: (\$\{)(?=.*?\})
1320
+ beginCaptures:
1321
+ '1':
1322
+ name: punctuation.definition.variable.php
1323
+ end: (\})
1324
+ endCaptures:
1325
+ '1':
1326
+ name: punctuation.definition.variable.php
1327
+ patterns:
1328
+ - include: ! '#language'
1329
+ scopeName: source.php
1330
+ uuid: 22986475-8CA5-11D9-AEDD-000D93C8BE28