]> git.pld-linux.org Git - packages/vim.git/blame - php.vim
updated to 7.3.1105
[packages/vim.git] / php.vim
CommitLineData
21166df1
AG
1" Vim syntax file
2" Language: PHP 4/5
3" Maintainer: Peter Hodge <toomuchphp-vim@yahoo.com>
d99475eb 4" Last Change: May 7, 2008
21166df1
AG
5"
6" URL: http://www.vim.org/scripts/script.php?script_id=1571
d99475eb 7" Version: 0.9.7
21166df1
AG
8"
9" ================================================================
10"
11" Note: If you are having speed issues loading or editting PHP files, try
12" disabling some of the options. In your .vimrc, try adding:
13" :let php_folding = 0
14" :let php_strict_blocks = 0
15"
d99475eb
ER
16" Also, there is a 'large file' mode which can disable certain options
17" if a PHP file is too big (see php_large_file below).
18"
21166df1
AG
19" ================================================================
20"
d99475eb
ER
21" Note: If you are using a colour terminal with a dark background, you will
22" probably find the 'elflord' colorscheme will give you the most
23" distinctive colors.
21166df1
AG
24"
25" ================================================================
26"
27" OPTIONS:
28"
d99475eb
ER
29" Many of these default to 1 (On), so you would need to set
30" them to 0 to turn them off. E.g., in your .vimrc file:
31" let php_special_vars = 0
32" let php_special_functions = 0
33" let php_alt_comparisons = 0
34" etc.
35" If the variables do not exist, the default value will be used.
36"
37"
38" All options can be set globally or on a per-file basis by using
39" global or buffer-local variables. For example, you could turn on
40" automatic folding for all PHP scripts in your .vimrc:
41" let g:php_folding = 3
21166df1 42"
d99475eb
ER
43" Then you could turn it off in only one file using this command:
44"
45" :let b:php_folding = 0 | setfiletype php
21166df1
AG
46"
47"
48" -- PHP FEATURES --
49"
50" let php_sql_query = 1/0 [default 0]
51" ... for SQL syntax highlighting inside strings
52"
53" let php_htmlInStrings = 1/0 [default 0]
54" ... for HTML syntax highlighting inside strings
55"
56" let php_baselib = 1/0 [default 0]
57" ... for highlighting baselib functions
58"
d99475eb 59" let php_special_vars = 1/0 [default 1]
21166df1
AG
60" ... to highlight superglobals like $_GET, $_SERVER, etc.
61" * always on if using php_oldStyle
62"
63" let php_special_functions = 1/0 [default 1]
64" ... to highlight functions with special behaviour
65" e.g., unset(), extract()
66"
67" let php_alt_comparisons = 1/0 [default 1]
68" ... to highlight comparison operators in an alternate colour
69" * always on if using php_oldStyle
70"
71" let php_alt_assignByReference = 1/0 [default 1]
72" ... to highlight '=&' in '$foo =& $bar' in an alternate colour.
73" This also applies to a function which returns by-reference,
74" as well as a function argument which is by-reference.
75"
d99475eb
ER
76" let php_smart_members = 1/0 [default 0]
77" ... syntax works out whether -> indicates a property or method.
78" Otherwise method colours may be used on properties, for
79" example:
80" $object->__get[] = true;
81" '__get' would be highlighted as a special method, even
82" thought it is clearly a property in this context.
83" Note: turning this OFF can improve the highlighting speed on
84" object-oriented code
85"
21166df1
AG
86" let php_alt_properties = 1/0 [default 0]
87" ... use a different color for '->' based on whether it is used
88" for property access, method access, or dynamic access (using
89" '->{...}')
d99475eb 90" * requires php_smart_members
21166df1
AG
91"
92" let php_highlight_quotes = 1/0 [default 0]
93" ... makes quote characters the same colour as the string
94" contents, like in C syntax.
95"
96" let php_show_semicolon = 1/0 [default 1]
97" ... to make the semicolon (;) more visible
98"
99" let php_smart_semicolon = 1/0 [default 1]
100" ... semicolon adopts the color of a 'return' or 'break' keyword
101" * requires php_show_semicolon
d99475eb
ER
102" Note: this also includes the ':' or ';' which follows a
103" 'case' or 'default' inside a switch
21166df1
AG
104"
105" let php_alt_blocks = 1/0 [default 1]
d99475eb
ER
106" ... colorize { and } around class/function/try/catch bodies
107" according to the type of code block.
21166df1
AG
108" * requires php_strict_blocks
109"
110" let php_alt_arrays = 0/1/2 [default 1]
111" ... to colorize ( and ) around an array body, as well as '=>'
112" * requires php_strict_blocks
113" Setting this to '2' will highlighting the commas as well.
114" Commas are not highlighted by default because it's too much
115" color.
116"
d99475eb
ER
117" let php_alt_construct_parents = 0/1 [default 0]
118" ... to colorize the ( and ) around an if, while, foreach, or switch
119" body.
120" * requires ... what?
121" TODO: work out dependencies, code them correctly
122"
123" let php_show_spl = 1/0 [default 1]
124" .. to colorize methods which are defined by PHP default interfaces
125" TODO: work out what these interfaces are part of: SPL or just
126" PHP
127"
128" let php_show_pcre = 1/0 [default 1]
129" (was: 'php_show_preg')
21166df1 130" ... to highlight regular expression patterns inside calls
d99475eb 131" to preg_match(), preg_replace(), etc.
21166df1
AG
132"
133"
134" -- FINDING ERRORS --
135"
136" let php_parent_error_close = 1/0 [default 1]
137" ... for highlighting parent error ] or ) or }
138" * requires php_strict_blocks
139"
d99475eb 140" let php_parent_error_open = ?
21166df1
AG
141" ... for skipping a php end tag, if there exists an
142" open ( or [ without a closing one
143" Note: this option is now enabled permanently (unless
144" php_strict_blocks is disabled).
145" * requires php_strict_blocks
146"
147" let php_empty_construct_error = 0/1 [default 1]
148" ... highlights ';' as an error if it comes immediately after
149" an if/else/while/for/foreach/switch statement (the
150" logical constructs should have a body).
151" * requires php_strict_blocks
d99475eb
ER
152
153" let php_show_semicolon_error = 1/0 [default 1]
154" ... highlights certain cases when ';' is followed by an
155" operator such as '+'.
156" * requires php_show_semicolon
21166df1
AG
157"
158" let php_nested_functions = 0/1 [default 0]
159" ... Whether or not to allow contiaining one function inside
160" another. This option is mostly for speeding up syntax
161" highlighting - { } blocks can by inserted much faster while
162" editting a large class.
163" Note: this is the only option which might break valid PHP
164" code, although only if you define one function inside
d99475eb
ER
165" another, which is usually discouraged.
166" * only relevant when using php_strict_blocks
21166df1
AG
167"
168" -- OTHER OPTIONS --
169"
d99475eb
ER
170" let php_large_file = 0/? [ default 3000 ]
171" ... If a PHP script has more lines than this limit (e.g., more
172" than 3000 lines), some options are automatically turned off
173" to help it load faster. These options are:
174" php_strict_blocks = 0
175" php_smart_members = 0
176" php_smart_semicolon = 0
177" php_show_pcre = 0
178" php_folding = 0
179" Note: If you set this option to '0', then this feature will
180" be disabled; thus you can use:
181" :let b:php_large_file = 0 | setfiletype php
182" to reload the current file with the disabled syntax options
183" re-activated.
184"
21166df1
AG
185" let php_strict_blocks = 1/0 [default 1]
186" ... to match together all {} () and [] blocks correctly. This is
d99475eb 187" required by some of the other options for finding errors and
21166df1
AG
188" applying correct colors to { } blocks, etc. However, it may
189" cause Vim to slow down on large files.
190"
191" let php_asp_tags = 1/0 [default 0]
d99475eb 192" ... for highlighting ASP-style short tags: <% %>
21166df1
AG
193"
194" let php_noShortTags = 1/0 [default 0]
195" ... don't sync <? ?> as php
d99475eb
ER
196" * This has been deprecated in favour of php_short_tags (which
197" has the opposite meaning)
198"
199" let php_short_tags = 1/0 [default 1]
200" ... highlight <?...?> blocks as php. If this is OFF, you need to
201" use the longer <?php...?>
21166df1
AG
202"
203" let php_oldStyle = 1
204" ... for using old colorstyle
205"
206" let php_folding = 1/2/3 [default 0]
207" ... 1: for folding classes and functions
208" 2: for folding all { } regions
209" 3: for folding only functions
d99475eb 210" TODO: documentation for php_folding_manual
21166df1
AG
211"
212" let php_fold_arrays = 0/1 [default 0]
213" ... To fold arrays as well.
d99475eb
ER
214" * requires php_folding, php_strict_blocks, php_alt_arrays
215"
216" let php_fold_heredoc = 0/1 [default 0]
217" ... Fold heredoc blocks ($string = <<<ENDOFSTRING)
21166df1
AG
218" * requires php_folding
219"
220" let php_sync_method = x
221" ... x = -1 to sync by search (default)
222" x > 0 to sync at least x lines backwards
223" x = 0 to sync from start
21166df1
AG
224"
225"
226" ================================================================
227"
228" TODO LIST:
229"
230" PRIORITY:
d99475eb
ER
231" - document the phpControlParent feature, make sure it works fully, or not
232" at all
21166df1 233" - what to do about 'iskeyword' containing '$'?
21166df1 234" - test syntax against older Vims (6.4, 6.0, 5.7)
d99475eb 235" - concat rid of lines beginning with '\'
21166df1 236" - allow turning off all semicolon errors
d99475eb
ER
237" - fix bug in highlighting of pattern: /[\\\]/ and /[\\]]/
238" - fix bug in highlighting of pattern: "/\$/" should make the '$' match the
239" end-of-pattern
240" - case/default syntax items don't work inside a switch/endswitch
241" although it's still OK using {...}
21166df1
AG
242"
243" PHP Syntax:
21166df1
AG
244" - review support for PHP built-in superglobals:
245" - ensure all PHP 5.2 superglobals are recognized
21166df1
AG
246" - review support for PHP built-in constants, make sure I've got them all
247" - make support for PHP built-in class methods optional.
248" - review highlight links to ensure maximum readability on GUI
249" and color terminal using colorschemes 'elflord' and 'default'
250" - new group phpReservedFunction, because some parts of
251" phpSpecialFunction can be used as a method name.
252" - what is php_oldStyle? is it still needed?
253" - use 'nextgroup' to highlight errors when a ']' or ')' is followed by
254" a constant/variable or function call. This will also help find when
255" a closing ')' is missing.
d99475eb
ER
256" - Review syncing searches, see if there is anything we can add to help the
257" syncing process.
258" - make ';' on the end of a while() NOT a problem unless it is followed by
259" a '{'
21166df1
AG
260"
261" PCRE Syntax:
d99475eb
ER
262" - fix problem: in regex "/(...)\1/", '\1' does NOT refer to a backreference!
263" this is caused by incorrect matching of escape sequences in
264" double-quoted strings where the double-quote escape sequences should
265" take precedence
266" - fix problem: this line breaks folding
267" preg_match("#^require MODULES_PATH \. (['\"])main\.inc\.php\\1;$#m", '', $m))
268"
21166df1
AG
269" - decide on terminology: 'PCRE' or 'PREG'
270" - Review effects of paired delimiters when combined with other
271" PCRE complex atoms using those symbols
272" - decide on better colors for the
273" (?(?=lookahead/lookbehind)conditional|sub-pattern)
274"
275"
276" Future Plans:
277" - option to choose PHP4 or PHP5 compatibility
21166df1
AG
278" - differentiate between an interface block and a class block
279" - add ability to highlight user-defined functions and keywords
280" using any of the following means:
281" 1) a comma-separated string of user functions
282" 2) a file containing user functions
283" 3) using names from the tags file(s)
284" (this may be better as a separate plugin)
285" - add support for phpDocumentor comment blocks and tags
286" - add support for POSIX Regex patterns
287" - allow easy embedding of the PHP syntax using 'contains=@phpClTop' or
288" 'syn region phpRegion ...'
289" - automatically select best colors by examining the colorscheme
d99475eb 290" - check to see if 'baselib' needs to be highlighted still
21166df1
AG
291" - Add support 2nd parameter to preg_replace and highlight
292" "\1" and other confusing sequences as errors ("\1" is "\x01")
d99475eb
ER
293" - Add support for class constants (foo::bar)
294"
295" Difficult To Implement:
296" - Highlight expressions without operators or commas, such as:
297" echo $a $b;
298" These expressions are *really* difficult to find efficiently.
299" - Folding around 'case' blocks.
300"
301"
21166df1
AG
302"
303" ================================================================
304"
305" Note:
306" - syntax case is 'ignore' unless explicitly set to 'match'
307" for a single item.
308
309" For version 5.x: Clear all syntax items
310" For version 6.x: Quit when a syntax file was already loaded
311if version < 600
312 syn clear
313elseif exists("b:current_syntax")
314 finish
315endif
316
317if !exists("main_syntax")
318 let main_syntax = 'php'
319endif
320
321" TODO: what's all this about?
322if version < 600
323 unlet! php_folding
324 if exists("php_sync_method") && !php_sync_method
325 let php_sync_method=-1
326 endif
327 so <sfile>:p:h/html.vim
328else
329 runtime! syntax/html.vim
330 unlet b:current_syntax
331endif
332
333" accept old options
334if !exists("php_sync_method")
335 if exists("php_minlines")
336 let php_sync_method=php_minlines
337 else
338 let php_sync_method=-1
339 endif
340endif
341
342function! s:ChooseValue(name, default)
343 if exists('b:' . a:name)
344 return b:{a:name}
345 elseif exists('g:' . a:name)
346 return g:{a:name}
347 else
348 return a:default
349 endif
350endfunction
351
d99475eb
ER
352" set up variables based on global or buffer variables {{{1
353 " Is it a large file? (s:large_file) {{{2
354 let s:large_file_limit = s:ChooseValue('php_large_file', 3000)
355 let s:large_file = (s:large_file_limit == 0) ? 0 : (line('$') >= s:large_file_limit)
21166df1 356
d99475eb
ER
357 if s:large_file
358 echohl WarningMsg
359 echomsg printf('WARNING: Large PHP File (%d lines); some syntax options have been disabled.', line('$'))
360 echohl None
361 endif
21166df1 362
d99475eb
ER
363 " Strict Blocks (s:strict_blocks) {{{2
364 let s:strict_blocks = s:large_file ? 0 : s:ChooseValue('php_strict_blocks', 1)
365
366 " Fold Level (s:folding) {{{2
367 let s:folding = s:large_file ? 0 : s:ChooseValue('php_folding', 0)
368
369 " Fold manually (s:fold_manual) {{{2
370 let s:fold_manual = s:large_file ? 0 : s:ChooseValue('php_fold_manual', s:folding ? 1 : 0)
371
372 " Fold arrays (s:fold_arrays) {{{2
21166df1
AG
373 let s:fold_arrays = (s:folding && s:ChooseValue('php_fold_arrays', 0))
374
d99475eb
ER
375 " Fold heredoc strings (s:fold_heredoc) {{{2
376 let s:fold_heredoc = (s:folding && s:ChooseValue('php_fold_heredoc', 0))
377
378 " Allow nested functions (s:nested_functions) {{{2
21166df1
AG
379 let s:nested_functions = s:ChooseValue('php_nested_functions', 1)
380
d99475eb 381 " Allow ASP-style <% %> tags (s:asp_tags) {{{2
21166df1
AG
382 let s:asp_tags = s:ChooseValue('php_asp_tags', 0)
383
d99475eb
ER
384 " Only allow long tags '<?php' (s:long_tags) {{{2
385 let s:long_tags = !s:ChooseValue('php_short_tags', !s:ChooseValue('php_noShortTags', 0))
21166df1 386
d99475eb 387 " SQL in strings (s:show_sql) {{{2
21166df1
AG
388 let s:show_sql = s:ChooseValue('php_sql_query', 0)
389
d99475eb 390 " HTML in strings (s:show_html_in_strings) {{{2
21166df1
AG
391 let s:show_html_in_strings = s:ChooseValue('php_htmlInStrings', 0)
392
d99475eb 393 " Highlight the PHP baselib (s:show_baselib) {{{2
21166df1
AG
394 let s:show_baselib = s:ChooseValue('php_baselib', 0)
395
d99475eb
ER
396 " Highlight superglobals (s:special_vars) {{{2
397 let s:special_vars = s:ChooseValue('php_special_vars', s:ChooseValue('php_special_variables', s:ChooseValue('php_oldStyle', 1)))
21166df1 398
d99475eb 399 " Highlight special functions (s:special_functions) {{{2
21166df1
AG
400 let s:special_functions = s:ChooseValue('php_special_functions', 1)
401
d99475eb 402 " Highlight quotes around strings (s:show_quotes) {{{2
21166df1
AG
403 let s:show_quotes = s:ChooseValue('php_highlight_quotes', 0)
404
d99475eb
ER
405 " Highlight PCRE patterns (s:show_pcre) {{{2
406 let s:show_pcre = s:large_file ? 0 : s:ChooseValue('php_show_pcre', s:ChooseValue('php_show_preg', 1))
21166df1 407
d99475eb 408 " Highlight ';' (s:show_semicolon) {{{2
21166df1
AG
409 let s:show_semicolon = s:ChooseValue('php_show_semicolon', 1)
410
d99475eb
ER
411 " Highlight ';' errors (s:show_semicolon_error) {{{2
412 let s:show_semicolon_error = (s:show_semicolon && s:ChooseValue('php_show_semicolon_error', 1))
413
414 " Highlight parent error ) ] or } (s:parent_error_close) {{{2
21166df1
AG
415 let s:parent_error_close = (s:strict_blocks && s:ChooseValue('php_parent_error_close', 1))
416
d99475eb 417 " Highlight invalid ';' after if/while/foreach (s:no_empty_construct) {{{2
21166df1
AG
418 let s:no_empty_construct = (s:strict_blocks && s:ChooseValue('php_empty_construct_error', 1))
419
d99475eb 420 " Alt colors for {} around class/func/try/catch blocks (s:alt_blocks) {{{2
21166df1
AG
421 let s:alt_blocks = (s:strict_blocks && s:ChooseValue('php_alt_blocks', 1))
422
d99475eb 423 " Alt color for by-reference operators (s:alt_refs) {{{2
21166df1
AG
424 let s:alt_refs = s:ChooseValue('php_alt_assignByReference', 1)
425
d99475eb
ER
426 " Alt color for control structure parents (s:alt_control_parents) {{{2
427 let s:alt_control_parents = s:ChooseValue('php_alt_construct_parents', 0)
428
429 " Alt color for array syntax (s:alt_arrays) {{{2
21166df1
AG
430 " * requires strict_blocks
431 let s:alt_arrays = (s:strict_blocks ? s:ChooseValue('php_alt_arrays', 1) : 0)
432
d99475eb
ER
433 " Alt color for comparisons (s:alt_comparisons) {{{2
434 let s:alt_comparisons = s:ChooseValue('php_alt_comparisons', s:ChooseValue('php_oldStyle', 1))
435
436 " Alt colors for ';' after return/break (s:smart_semicolon) {{{2
437 let s:smart_semicolon = s:large_file ? 0 : (s:show_semicolon && s:ChooseValue('php_smart_semicolon', 1))
438
439 " Alt colors for '->' (s:smart_members / s:alt_properties) {{{2
440 let s:smart_members = s:large_file ? 0 : s:ChooseValue('php_smart_members', 0)
441 let s:alt_properties = (s:smart_members && s:ChooseValue('php_alt_properties', 0))
21166df1 442
d99475eb
ER
443 " Syncing method (s:sync) {{{2
444 let s:sync = s:ChooseValue('php_sync_method', -1)
21166df1 445
d99475eb 446" }}}1
21166df1
AG
447
448delfunction s:ChooseValue
449
450syn cluster htmlPreproc add=phpRegion,phpRegionAsp,phpRegionSc
451
452" need to source the SQL syntax file in case we encounter
453" heredoc containing SQL
454if version < 600
455 syn include @sqlTop <sfile>:p:h/sql.vim
456else
457 syn include @sqlTop syntax/sql.vim
458endif
459
460syn sync clear
461unlet b:current_syntax
462syn cluster sqlTop remove=sqlString,sqlComment
463if s:show_sql
d99475eb 464 syn cluster phpClShowInStrings contains=@sqlTop
21166df1
AG
465endif
466
467if s:show_html_in_strings
d99475eb 468 syn cluster phpClShowInStrings add=@htmlTop
21166df1
AG
469endif
470
471" NOTE: syntax case should be 'ignore' for all items (in keeping
472" with PHP's case insensitive behaviour). If an item MUST be case
473" sensitive, 'syntax case match' should precede that item and
474" 'syntax case ignore' must follow IMMEDIATELY after so that there
475" can be no confusion over the value of 'syntax case' for most items
476" syntax matches and regions may use '\C' to utilize case sensitivity
477syn case ignore
478
d99475eb
ER
479" PHP syntax: clusters {{{1
480
481 " these represent a single value in PHP
482 syn cluster phpClValues add=@phpClConstants
483
484 syn cluster phpClValues add=phpIdentifier,phpIdentifierComplex,phpMethodsVar
485
486 " TODO: add class constants (foo::BAR)
487
488 " these can go anywhere an expression is valid inside PHP code
489 syn cluster phpClExpressions add=@phpClValues
490 syn cluster phpClExpressions add=phpRelation,phpList
491 syn cluster phpClExpressions add=phpParent,phpParentError
492 syn cluster phpClExpressions add=phpObjectOperator
493
494 " these are the control statements - they shouldn't contain each other
495 syn cluster phpClCode add=@phpClExpressions
496 syn cluster phpClCode add=phpLabel
497 syn cluster phpClCode add=phpFoldTry,phpFoldCatch
498
499 " TODO: what is phpStorageClass class exactly? it needs a more descriptive
500 " name so I know where to include it. Maybe it should be broken up
501 syn cluster phpClCode add=phpStorageClass
502
503 " code which is inside a function/method/class or global scope
504 syn cluster phpClInFunction add=@phpClCode
505 syn cluster phpClInMethod add=@phpClCode
506 syn cluster phpClInClass add=@phpClValues,phpAssign,phpSemicolon
507 syn cluster phpClTop add=@phpClCode
508
509 " This cluster contains matches to find where an expression follows another
510 " expression without a comma or operator inbetween
511 " TODO: is this even possible to do?
512 syn cluster phpClExprNotSeparated add=NONE
513
514 " Note: there is one cluster here each for:
515 " - constants
516 " - functions
517 " - classes
518 " - interfaces
519 " - structures (classes and interfaces combined)
520 " - methods
521 " - properties
522 " - members (things which are a method and a property)
523 syn cluster phpClConstants add=NONE
524 syn cluster phpClFunctions add=NONE
525
526 syn cluster phpClClasses add=NONE
527 syn cluster phpClInterfaces add=NONE
528 syn cluster phpClStructures add=@phpClClasses,@phpClInterfaces
529
530 syn cluster phpClMethods add=@phpClMembers
531 syn cluster phpClProperties add=@phpClMembers
532 syn cluster phpClMembers add=NONE
533
534 " these are the things which can be matched inside an identifier
535 syn cluster phpClIdentifier add=NONE
536
537 " Note: the next clusters contains all the regions or matches that can
538 " contain a class or interface name
539 syn cluster phpClClassHere add=phpStructureHere
540 syn cluster phpClInterfaceHere add=phpStructureHere
541 syn cluster phpClStructureHere add=@phpClClassHere,@phpClStructureHere
542
543 syn cluster phpClMethodHere add=phpMemberHere,phpMethodHere
544 syn cluster phpClPropertyHere add=phpMemberHere,phpPropertyHere
545 syn cluster phpClMemberHere add=@phpClMethodHere,@phpClPropertyHere
546
547 " also, some very basic matches for these place-holders
548 syn match phpStructureHere /\h\w*/ contained display
549 syn match phpMemberHere /\h\w*/ contained display
550 syn match phpMethodHere /\h\w*/ contained display
551 syn match phpPropertyHere /\h\w*/ contained display
552
553 " what to include at the top level?
554 if ! s:strict_blocks
555 " if not strict blocks, we must also allow matching of things from inside
556 " functions/methods/classes
557 syn cluster phpClTop add=@phpClInFunction,@phpClInMethod,@phpClInClass
558 endif
559
560 " Note: these are the old clusters ... they are deprecated now, but still
561 " here just in case someone is using them elsewhere
562 syn cluster phpClInside add=@phpClExpressions
563 syn cluster phpClConst add=@phpClExpressions
564 syn cluster phpClFunction add=@phpClCode
21166df1 565
d99475eb 566" PHP syntax: comments {{{1
21166df1 567
d99475eb
ER
568 syn cluster phpClValues add=phpComment
569 syn cluster phpClInClass add=phpComment
21166df1 570
d99475eb
ER
571 syn region phpComment start="/\*" end="\*/" contained extend contains=@Spell
572 if version >= 600
573 syn match phpComment "#.\{-}\(?>\|$\)\@=" contained extend contains=@Spell
574 syn match phpComment "//.\{-}\(?>\|$\)\@=" contained extend contains=@Spell
575 else
576 syn match phpComment "#.\{-}$" contained
577 syn match phpComment "#.\{-}?>"me=e-2 contained
578 syn match phpComment "//.\{-}$" contained
579 syn match phpComment "//.\{-}?>"me=e-2 contained
580 endif
21166df1 581
d99475eb
ER
582" PHP syntax: Operators: + - * / && || (etc) {{{1
583
584 " NOTE: these need to come before the numbers (so that floats work)
585 syn cluster phpClExpressions add=phpAssign
586 syn match phpAssign /==\@!/ contained display
587 hi link phpAssign phpOperator
588
589 syn cluster phpClExpressions add=phpOperator
590 syn match phpOperator contained display /[%^|*!.~]/
591 " & can't be preceded by a '=' or ',' or '('
592 syn match phpOperator contained display /\%([=,(]\_s*\)\@<!&/
593 " + can't be followed by a number or '.'
594 " - can't be followed by a number or '.' or '>'
595 syn match phpOperator contained display /+[.0-9]\@!/
596 syn match phpOperator contained display /-[.>0-9]\@!/
597 syn match phpOperator contained display /[-+*/%^&|.]=/
598 syn match phpOperator contained display /\/[*/]\@!/
599 syn match phpOperator contained display /&&/
600 syn match phpOperator contained display /||/
601 syn match phpOperator contained display />>/
602 " Note: how the shift-left operator can't be followed by another '<' (that
603 " would make it a Heredoc syntax)
604 syn match phpOperator contained display /<<<\@!/
605 syn keyword phpOperator contained and or xor
606
607 " allow a ':' on its own - this may be after an 'else:' or something like that
608 syn match phpOperator contained display /::\@!/
609
610 syn cluster phpClExpressions add=phpTernaryRegion
611 syn region phpTernaryRegion matchgroup=phpOperator start=/?/ end=/::\@!/
612 \ transparent keepend extend display
613 \ contained matchgroup=Error end=/[;)\]}]/
614
615
616" PHP syntax: null/true/false/numbers {{{1
617
618 syn cluster phpClValues add=phpNull
619 syn keyword phpNull contained null
620
621 syn cluster phpClValues add=phpBoolean
622 syn keyword phpBoolean contained true false
623
624 syn cluster phpClValues add=phpNumber
625 syn match phpNumber contained display /\<[1-9]\d*\>/
626 syn match phpNumber contained display /-[1-9]\d*\>/
627 syn match phpNumber contained display /+[1-9]\d*\>/
628 syn match phpNumber contained display /\<0x\x\{1,8}\>/
629 syn match phpNumber contained display /\<0\d*\>/ contains=phpOctalError
630 syn match phpOctalError contained display /[89]/
631
632 " Note: I've split float into 3 matches which each have a fixed starting
633 " character
634 syn cluster phpClValues add=phpFloat
635 syn match phpFloat contained display /\.\d\+\>/
636 syn match phpFloat contained display /\<\d\+\.\d\+\>/
637 syn match phpFloat contained display /-\d*\.\d\+\>/
638 syn match phpFloat contained display /+\d*\.\d\+\>/
639
640" PHP syntax: dynamic strings {{{1
641
642 " single-quoted strings are always the same
643 " TODO: work out a good name for an option which will add 'display' option
644 " to these strings
645 syn cluster phpClValues add=phpStringSingle
646 syn region phpStringSingle matchgroup=phpQuoteSingle start=/'/ skip=/\\./ end=/'/
647 \ contained keepend extend contains=@phpClShowInStrings
648
649 " Note: this next version of the php double-quoted string can't contain
650 " variables, because a few parts of PHP code require strings without
651 " variables. There is another string match later which takes precedence
652 " over this one in most circumstances where a string containing variables IS
653 " allowed
654 syn cluster phpClValues add=phpStringDoubleConstant
655 syn region phpStringDoubleConstant contained keepend extend
656 \ matchgroup=phpQuoteSingle start=/"/ end=/"/ skip=/\\./
657 \ contains=@phpClShowInStrings,phpSpecialChar
658
659 " Note: this version of the double-quoted string also contains
660 " @phpClStringIdentifiers, which means variables can go inside the string
661 syn cluster phpClExpressions add=phpStringDouble
662 syn region phpStringDouble matchgroup=phpQuoteDouble start=/"/ skip=/\\./ end=/"/
663 \ contained keepend extend
664 \ contains=@phpClShowInStrings,phpSpecialChar,@phpClStringIdentifiers
665
666 " backticks
667 syn cluster phpClExpressions add=phpBacktick
668 syn region phpBacktick matchgroup=phpQuoteBacktick start=/`/ skip=/\\./ end=/`/
669 \ contained keepend extend
670 \ contains=phpSpecialChar,@phpClStringIdentifiers
671
672 " this cluster contains only strings which accept things like \n or \x32
673 " inside them
674 syn cluster phpClStringsWithSpecials add=phpStringDoubleConstant,@phpClStringsWithIdentifiers
675
676 " this cluster contains strings which accept things like {$foo} inside them
677 syn cluster phpClStringsWithIdentifiers add=phpStringDouble,phpBacktick,phpHereDoc
678
679 " HereDoc {{{
680 if version >= 600
681 syn cluster phpClExpressions add=phpHereDoc
682 syn case match
683" syn keyword phpHereDoc contained foobar
684 if s:folding && s:fold_heredoc
685 syn region phpHereDoc keepend extend contained
686 \ matchgroup=phpHereDocDelimiter end=/^\z1\%(;\=$\)\@=/
687 \ start=/<<<\s*\z(\h\w*\)$/
688 \ contains=phpSpecialChar
689 \ fold
21166df1 690
d99475eb
ER
691 " always match special Heredocs which state what type of content they have
692 syn region phpHereDoc keepend extend contained
693 \ matchgroup=phpHereDocDelimiter end=/^\z1\%(;\=$\)\@=/
694 \ start=/\c<<<\s*\z(\%(\h\w*\)\=html\)$/
695 \ contains=@htmlTop,phpSpecialChar
696 \ fold
697 syn region phpHereDoc keepend extend contained
698 \ matchgroup=phpHereDocDelimiter end=/^\z1\%(;\=$\)\@=/
699 \ start=/\c<<<\s*\z(\%(\h\w*\)\=sql\)$/
700 \ contains=@sqlTop,phpSpecialChar
701 \ fold
702 syn region phpHereDoc keepend extend contained
703 \ matchgroup=phpHereDocDelimiter end=/^\z1\%(;\=$\)\@=/
704 \ start=/\c<<<\s*\z(\%(\h\w*\)\=javascript\)$/
705 \ contains=@htmlJavascript,phpSpecialChar
706 \fold
707 else
708 syn region phpHereDoc keepend extend contained
709 \ matchgroup=phpHereDocDelimiter end=/^\z1\%(;\=$\)\@=/
710 \ start=/<<<\s*\z(\h\w*\)$/
711 \ contains=phpSpecialChar
712
713 " always match special Heredocs which state what type of content they have
714 syn region phpHereDoc keepend extend contained
715 \ matchgroup=phpHereDocDelimiter end=/^\z1\%(;\=$\)\@=/
716 \ start=/\c<<<\s*\z(\%(\h\w*\)\=html\)$/
717 \ contains=@htmlTop,phpSpecialChar
718 syn region phpHereDoc keepend extend contained
719 \ matchgroup=phpHereDocDelimiter end=/^\z1\%(;\=$\)\@=/
720 \ start=/\c<<<\s*\z(\%(\h\w*\)\=sql\)$/
721 \ contains=@sqlTop,phpSpecialChar
722 syn region phpHereDoc keepend extend contained
723 \ matchgroup=phpHereDocDelimiter end=/^\z1\%(;\=$\)\@=/
724 \ start=/\c<<<\s*\z(\%(\h\w*\)\=javascript\)$/
725 \ contains=@htmlJavascript,phpSpecialChar
726 endif
21166df1 727
d99475eb
ER
728 syn case ignore
729 endif " }}}
21166df1 730
21166df1 731
d99475eb 732" PHP syntax: strings: special sequences {{{1
21166df1 733
d99475eb
ER
734 " match an escaped backslash inside any type of string
735 syn match phpStringLiteral /\\\\/ contained display
736 \ containedin=phpStringSingle,@phpClStringsWithSpecials
21166df1 737
d99475eb
ER
738 " match an escaped quote in each type of string
739 syn match phpStringLiteral /\\`/ contained display containedin=phpBacktick
740 syn match phpStringLiteral /\\'/ contained display containedin=phpStringSingle
741 syn match phpStringLiteral /\\"/ contained display
742 \ containedin=phpStringDouble,phpStringDoubleConstant
21166df1 743
d99475eb
ER
744 " highlighting for an escaped '\$' inside a double-quoted string
745 syn match phpStringLiteral /\\\$/ contained display containedin=@phpClStringsWithSpecials
746
747 " match \{ as regular string content so that it stops \{$var} from
748 " highlighting the { } region
749 syn match phpStringRegular /\\{/ contained display containedin=@phpClStringsWithSpecials
750 hi link phpStringRegular phpStringDouble
751
752 " match an \r\n\t or hex or octal sequence
753 " TODO: these should also be available in PCRE pattern strings
754 " TODO: what were all these extra escape sequences???
755 syn match phpSpecialChar contained display /\\[nrt]/
756 syn match phpSpecialChar contained display /\\\o\{1,3}/
757 syn match phpSpecialChar contained display /\\x\x\x\=/
758
759 " create an identifier match for inside strings:
760 syn match phpIdentifierInString /\$\h\w*/ contained display
761 \ nextgroup=phpPropertyInString,phpPropertyInStringError,@phpClIdentifierIndexInString
762 \ contains=phpIdentifier
763 \ containedin=@phpClStringsWithIdentifiers
764
765 " match an index [bar] [0] [$key] after a variable inside a string {{{2
766
767 " First: match the [ and ] which would appear in the index (they're
768 " contained int the following items)
769 syn match phpBracketInString /[[\]]/ contained display
770 hi link phpBracketInString phpSpecialChar
771
772 " Second: match a single '[' as an error
773 syn cluster phpClIdentifierIndexInString add=phpBracketInStringFalseStart
774 syn match phpBracketInStringFalseStart /\[\]\=/ contained display
775 hi link phpBracketInStringFalseStart Error
776
777 " Third: match any other [] region which is completed, but doesn't have a
778 " valid key
779 syn cluster phpClIdentifierIndexInString add=phpIdentifierIndexInString
780 syn match phpIdentifierIndexInString /\[[^"]\{-1,}\]/
781 \ contains=phpBracketInString,phpIdentifierIndexInStringError
782 \ contained display
783
784 " error on a bracket which is inside another bracket
785 syn match phpIdentifierIndexInStringError /\[[$_a-z0-9]*\[/ contained display
786 hi link phpIdentifierIndexInStringError Error
787
788 " any character which isn't a valid index character
789 syn match phpIdentifierIndexInStringError /[^$a-z0-9_[\]]\+/ contained display
790
791 " a number *must not* be preceded by the '[' and followed by a \w
792 syn match phpIdentifierIndexInStringError /\[\@<=\d\+\w\@=/ contained display
793
794 " a dollar sign *must* be preceded by the '['
795 syn match phpIdentifierIndexInStringError /\[\@<!\$/ contained display
796 \ containedin=phpIdentifierIndexInStringError
797
798 " Fourth: match a complete '[]' region properly
799
800 " 1) an index containing a number
801 syn match phpIdentifierIndexInString /\[\d\+\]/ contained display
802 \ contains=phpBracketInString
803
804 " 2) a word or variable
805 syn match phpIdentifierIndexInString /\[\$\=\h\w*\]/ contained display
806 \ contains=phpBracketInString,phpVarSelector
807 hi link phpIdentifierIndexInString Identifier
808
809 " }}}2
810
811 " match an property after a variable inside a string
812 syn cluster phpClPropertyHere add=phpPropertyInString
813 syn match phpPropertyInString /->\h\w*/ contained display extend
814 \ contains=phpPropertySelector,@phpClProperties
815
816 " it's sometimes easy to get it wrong
817 syn match phpPropertyInStringError contained display /->\%([^a-z0-9_"\\]\|\\.\)/
818 \ contains=phpPropertySelector
819 syn match phpPropertyInStringError contained display /->"\@=/
820 hi! link phpPropertyInStringError Error
821
822 syn region phpIdentifierInStringComplex matchgroup=phpSpecialChar
823 \ start=/{\$\@=/ start=/\${\w\@!/ end=/}/
824 \ contained extend keepend contains=@phpClExpressions
825 \ containedin=@phpClStringsWithIdentifiers
826
827 syn region phpIdentifierInStringErratic contained extend
828 \ matchgroup=phpSpecialChar start=/\${\w\@=/ end=/}/
829 \ containedin=@phpClStringsWithIdentifiers
830 \ contains=phpIdentifierErratic
831
832 syn match phpIdentifierErratic /{\@<=\h\w*/ contained
833 \ nextgroup=phpErraticBracketRegion
834 \ nextgroup=phpIdentifierInStringErraticError skipwhite skipempty
835 syn region phpErraticBracketRegion contained keepend extend contains=@phpClExpressions
836 \ matchgroup=phpParent start=/\[/ end=/\]/ display
837 \ matchgroup=Error end=/;/
838 \ nextgroup=phpIdentifierInStringErraticError skipwhite skipempty
839
840 syn match phpIdentifierInStringErraticError contained /[^ \t\r\n}]\+/
841 \ nextgroup=phpIdentifierInStringErraticError skipwhite skipempty
842 hi link phpIdentifierInStringErraticError Error
843
844
845" PHP syntax: variables/identifiers ($foo) {{{1
846
847 " one $
848 syn match phpVarSelector contained display /\$/
849 " two $$
850 syn match phpVarSelectorDeref contained display /\$\$/
851 syn match phpVarSelectorError contained display /\$\$\$\+/
852
853 " match a regular variable
854 syn cluster phpClExpressions add=phpIdentifier
855 syn match phpIdentifier /\$\h\w*/ contained display
856 \ contains=phpVarSelector,@phpClIdentifier
857
858 " match a dereference-variable ($$variable)
859 syn match phpIdentifier /\$\$\+\h\w*/ contained display
860 \ contains=@phpClIdentifier,phpVarSelectorDeref,phpVarSelectorError,phpDerefInvalid
861
862 " you can't dereference these variables:
863 syn match phpDerefInvalid contained display
864 \ /\C\$\$\ze\%(this\|arg[cv]\|GLOBALS\)\>/
865 syn match phpDerefInvalid contained display
866 \ /\C\$\$\ze_\%(GET\|POST\|REQUEST\|COOKIE\|SESSION\|SERVER\|ENV\)\>/
867 hi link phpDerefInvalid Error
868
869 if s:special_vars
870
871 syn case match
872
873 " Superglobals: {{{2
874 syn cluster phpClIdentifier add=phpSuperglobal
875 syn match phpSuperglobal contained display /\$\@<=GLOBALS\>/
876 syn match phpSuperglobal contained display /\$\@<=_GET\>/
877 syn match phpSuperglobal contained display /\$\@<=_POST\>/
878 syn match phpSuperglobal contained display /\$\@<=_COOKIE\>/
879 syn match phpSuperglobal contained display /\$\@<=_REQUEST\>/
880 syn match phpSuperglobal contained display /\$\@<=_FILES\>/
881 syn match phpSuperglobal contained display /\$\@<=_SESSION\>/
882 syn match phpSuperglobal contained display /\$\@<=_SERVER\>/
883 syn match phpSuperglobal contained display /\$\@<=_ENV\>/
884 syn match phpSuperglobal contained display /\$\@<=this\>/
885
886 " Built In Variables: {{{2
887 syn cluster phpClIdentifier add=phpBuiltinVar
888 syn match phpBuiltinVar contained display /\$\@<=argc\>/
889 syn match phpBuiltinVar contained display /\$\@<=argv\>/
890 syn match phpBuiltinVar contained display /\$\@<=php_errormsg\>/
891
892 " Long Arrays: {{{2
893 syn cluster phpClIdentifier add=phpLongVar
894 syn match phpLongVar contained display /\$\@<=HTTP_GET_VARS\>/
895 syn match phpLongVar contained display /\$\@<=HTTP_POST_VARS\>/
896 syn match phpLongVar contained display /\$\@<=HTTP_POST_FILES\>/
897 syn match phpLongVar contained display /\$\@<=HTTP_COOKIE_VARS\>/
898 syn match phpLongVar contained display /\$\@<=HTTP_SESSION_VARS\>/
899 syn match phpLongVar contained display /\$\@<=HTTP_SERVER_VARS\>/
900 syn match phpLongVar contained display /\$\@<=HTTP_ENV_VARS\>/
901
902 " Server Variables: {{{2
903 " TODO: check these against the latest PHP manual
904 syn cluster phpClIdentifier add=phpEnvVar
905 syn match phpEnvVar contained display /\C\$\@<=GATEWAY_INTERFACE\>/
906 syn match phpEnvVar contained display /\C\$\@<=SERVER_NAME\>/
907 syn match phpEnvVar contained display /\C\$\@<=SERVER_SOFTWARE\>/
908 syn match phpEnvVar contained display /\C\$\@<=SERVER_PROTOCOL\>/
909 syn match phpEnvVar contained display /\C\$\@<=REQUEST_METHOD\>/
910 syn match phpEnvVar contained display /\C\$\@<=QUERY_STRING\>/
911 syn match phpEnvVar contained display /\C\$\@<=DOCUMENT_ROOT\>/
912 syn match phpEnvVar contained display /\C\$\@<=HTTP_ACCEPT\>/
913 syn match phpEnvVar contained display /\C\$\@<=HTTP_ACCEPT_CHARSET\>/
914 syn match phpEnvVar contained display /\C\$\@<=HTTP_ENCODING\>/
915 syn match phpEnvVar contained display /\C\$\@<=HTTP_ACCEPT_LANGUAGE\>/
916 syn match phpEnvVar contained display /\C\$\@<=HTTP_CONNECTION\>/
917 syn match phpEnvVar contained display /\C\$\@<=HTTP_HOST\>/
918 syn match phpEnvVar contained display /\C\$\@<=HTTP_REFERER\>/
919 syn match phpEnvVar contained display /\C\$\@<=HTTP_USER_AGENT\>/
920 syn match phpEnvVar contained display /\C\$\@<=REMOTE_ADDR\>/
921 syn match phpEnvVar contained display /\C\$\@<=REMOTE_PORT\>/
922 syn match phpEnvVar contained display /\C\$\@<=SCRIPT_FILENAME\>/
923 syn match phpEnvVar contained display /\C\$\@<=SERVER_ADMIN\>/
924 syn match phpEnvVar contained display /\C\$\@<=SERVER_PORT\>/
925 syn match phpEnvVar contained display /\C\$\@<=SERVER_SIGNATURE\>/
926 syn match phpEnvVar contained display /\C\$\@<=PATH_TRANSLATED\>/
927 syn match phpEnvVar contained display /\C\$\@<=SCRIPT_NAME\>/
928 syn match phpEnvVar contained display /\C\$\@<=REQUEST_URI\>/
929 endif
930
931 " }}}2
932
933" PHP Syntax: type-casting: (string)$foo {{{1
934
935 syn cluster phpClValues add=phpType
936 syn keyword phpType contained null bool boolean int integer real double float string object
937 " only match 'array' as a type when it *isn't* followed by '('
938 syn match phpType contained /\<array\>\%(\_s*(\)\@!/
939
940" PHP Syntax: function/static calls: {{{1
941
942 " Note: I could have forced function calls to be matched only when a '('
943 " follows, but I think users would want PHP functions highlighted in more
944 " places, rather than less, so I have just added the :\@! to make sure it is
945 " not part of a static method call
946 " Note: this didn't work properly ... if the match didn't include the
947 " '(...)', then functions in @phpClFunctions can't have a nextgroup on them
948 syn cluster phpClExpressions add=@phpClFunctions
949" syn cluster phpClExpressions add=phpFunctionCall
950" syn match phpFunctionCall contained /\<\%(\h\w*\)(\_.*)/
951" \ contains=@phpClFunctions
952
953 " Also, a match when a word is part of a :: reference:
954 syn cluster phpClValues add=phpStaticUsage
955 syn cluster phpClExpressions add=phpStaticUsage
956 syn cluster phpClStructureHere add=phpStaticUsage
957 syn match phpStaticUsage contained display /\<\%(\h\w*\)\@>\%(\_s*::\)\@=/
958 \ transparent contains=@phpClClasses
959
960
961 " a match for a static function call
962 syn cluster phpClValues add=phpStaticAccess
963 syn cluster phpClExpressions add=phpStaticVariable,phpStaticCall
964 syn cluster phpClPropertyHere add=phpStaticAccess
965 syn cluster phpClMethodHere add=phpStaticCall
966
967 " also allowed in function prototypes
968 syn cluster phpClDefineFuncProtoArgs add=phpStaticAccess
969
970 syn match phpStaticAccess contained extend display /::\_s*\%(\h\w*\|\%#\)/ contains=phpDoubleColon
971 syn match phpStaticCall contained extend display /::\_s*\h\w*\ze\_s*(/
972 \ contains=phpDoubleColon,@phpClMethods
973
974 " a match for a static variable usage
975 syn match phpStaticVariable contained display /::\_s*\$\h\w*/ extend
976 \ contains=phpDoubleColon,phpIdentifier
977
978 " a match for a static constant usage
979
980 syn match phpDoubleColon contained display /::/
981 hi link phpDoubleColon phpDefine
982
983
984" PHP Syntax: magic classes (self/parent): {{{1
985
986 syn cluster phpClClasses add=phpMagicClass
987 syn keyword phpMagicClass contained self parent
988
989 " Note: 'self' and 'parent' are also matched in other places because they
990 " could be confusing otherwise ...
991 syn cluster phpClValues add=phpMagicClass
992
993" PHP Syntax: control structures: {{{1
994
995 syn cluster phpClCode add=phpConditional
996 syn keyword phpConditional contained declare enddeclare if else elseif endif
997
998 syn cluster phpClCode add=phpRepeat
999 syn keyword phpRepeat contained foreach endforeach
1000 \ do while endwhile for endfor
1001 \ switch endswitch
1002
1003 " override 'foreach' if we need use a special colour for the '(...)' region
1004 if s:alt_arrays || s:alt_control_parents
1005 syn keyword phpRepeat contained foreach nextgroup=phpForeachRegion skipwhite skipempty
1006 syn keyword phpAs contained as containedin=phpForeachRegion
1007 hi link phpAs phpRepeat
1008 else
1009 " otherwise, allow 'as' anywhere
1010 syn cluster phpClExpressions add=phpAs
1011 syn keyword phpAs contained as
1012 endif
21166df1 1013
d99475eb
ER
1014 if s:strict_blocks
1015 " need an alternate parenthesis block for 'for' structure
1016 " when using strict blocks
1017 syn keyword phpRepeat contained for nextgroup=phpForRegion skipwhite skipempty
1018
1019 " if looking for errors with semicolons, add the other 'nextgroups' as well
1020 if s:no_empty_construct
1021 syn keyword phpRepeat contained while nextgroup=phpConstructRegion skipwhite skipempty
1022 syn keyword phpRepeat contained switch nextgroup=phpSwitchConstructRegion skipwhite skipempty
1023 syn keyword phpConditional contained if elseif nextgroup=phpConstructRegion skipwhite skipempty
1024 syn keyword phpConditional contained else nextgroup=phpSemicolonNotAllowedHere skipwhite skipempty
1025 syn keyword phpRepeat contained do nextgroup=phpDoBlock,phpSemicolonNotAllowedHere skipwhite skipempty
1026 if s:folding == 2
1027 syn region phpDoBlock matchgroup=phpBrace start=/{/ end=/}/ keepend extend
1028 \ contained transparent
1029 \ nextgroup=phpDoWhile skipwhite skipempty
1030" \ matchgroup=phpHTMLError end=/?>/
1031 \ fold
1032 syn region phpSwitchBlock matchgroup=phpBrace start=/{/ end=/}/ keepend extend
1033 \ contained contains=@phpClInSwitch,@phpClCode
1034 \ fold
1035 else
1036 syn region phpDoBlock matchgroup=phpBrace start=/{/ end=/}/ keepend extend
1037 \ contained transparent
1038 \ nextgroup=phpDoWhile skipwhite skipempty
1039" \ matchgroup=phpHTMLError end=/?>/
1040 syn region phpSwitchBlock matchgroup=phpBrace start=/{/ end=/}/ keepend extend
1041 \ contained contains=@phpClInSwitch,@phpClCode
1042
1043 " TODO: thoroughly test this feature ...
1044 if s:fold_manual
1045 syn region phpDoBlock matchgroup=phpBrace start='{\ze\s*//\s*fold\s*$\c' end='}' keepend extend
1046 \ contained transparent
1047 \ nextgroup=phpDoWhile skipwhite skipempty
1048" \ matchgroup=phpHTMLError end=/?>/
1049 \ fold
1050 syn region phpSwitchBlock matchgroup=phpBrace start='{\ze\s*//\s*fold\s*$\c' end='}' keepend extend
1051 \ contained contains=@phpClInSwitch,@phpClCode
1052 \ fold
1053 endif
1054 endif
1055 syn keyword phpDoWhile contained while nextgroup=phpDoWhileConstructRegion skipwhite skipempty
1056 hi link phpDoWhile phpRepeat
1057 endif
1058 endif
1059
1060
1061" PHP Syntax: statements: {{{1
1062
1063 " if we are not using smart semicolons, we can implement these using
1064 " keywords
1065 if ! s:smart_semicolon
1066 syn cluster phpClCode add=phpStatement
1067 syn keyword phpStatement contained return break continue exit die throw
1068
1069 syn cluster phpClInSwitch add=phpCase
1070 syn keyword phpCase contained case default
1071
1072 else
1073 " if we *are* using smart semicolons, we'll need to use regions instead
1074 syn cluster phpClCode add=phpStatementRegion
1075 syn cluster phpClInSwitch add=phpCaseRegion
1076
1077 " with or without error on mis-matched /})]/ at end?
1078 " Note: by containing phpSemicolonError, the semicolon error is
1079 " automatically taken care of by the phpSemicolonError item
1080
1081 " return/break/continue/exit/die: {{{2
1082 " Note: having an error ending at 'private/var/final' etc, makes things much
1083 " much faster for writing classes.
1084 if s:strict_blocks
1085 syn region phpStatementRegion extend keepend contained
1086 \ contains=@phpClExpressions,phpSemicolonError
1087 \ matchgroup=phpStatement end=/;/ end=/\ze?>/
1088 \ start=/\$\@<!\<return\>/
1089 \ start=/\$\@<!\<break\>/
1090 \ start=/\$\@<!\<continue\>/
1091 \ start=/\$\@<!\<exit\>/
1092 \ start=/\$\@<!\<die\>/
1093 \ start=/\$\@<!\<throw\>/
1094 \ matchgroup=Error
1095 \ end=/[$>]\@<!\<\%(protected\|public\|private\|var\|final\|abstract\|static\)\>/
1096 \ end=/}/ end=/)/ end=/\]/
1097 \ end=/,/
1098" \ end=/;\_s*\%([.*\^|&,:!=<>]\|?>\@!\|\/[/*]\@!\|++\@!\|--\@!\)/
1099 else
1100 syn region phpStatementRegion extend keepend contained
1101 \ contains=@phpClExpressions,phpSemicolonError
1102 \ matchgroup=phpStatement end=/;/
1103 \ start=/\$\@<!\<return\>/
1104 \ start=/\$\@<!\<break\>/
1105 \ start=/\$\@<!\<continue\>/
1106 \ start=/\$\@<!\<exit\>/
1107 \ start=/\$\@<!\<die\>/
1108 \ start=/\$\@<!\<throw\>/
1109" \ end=/;\_s*\%([.*\^|&,:!=<>]\|?>\@!\|\/[/*]\@!\|++\@!\|--\@!\)/
1110 endif " }}}2
1111 " case: {{{2
1112 if s:strict_blocks
1113 syn region phpCaseRegion extend keepend contained display
1114 \ contains=@phpClExpressions,phpSemicolonError,phpColonError
1115 \ matchgroup=phpCase start=/\$\@<!\<case\>/ end=/[;:]/ skip=/::/
1116 \ matchgroup=Error
1117 \ end=/}/ end=/)/ end=/\]/
1118" \ end=/;\_s*\%([.*\^|&,:!=<>]\|?>\@!\|\/[/*]\@!\|++\@!\|--\@!\)/
1119 else
1120 syn region phpCaseRegion extend keepend contained display
1121 \ contains=@phpClExpressions,phpSemicolonError,phpColonError
1122 \ matchgroup=phpCase start=/\$\@<!\<case\>/ end=/[;:]/
1123 endif " }}}2
1124 " default: {{{2
1125 if s:strict_blocks
1126 syn region phpCaseRegion extend keepend contained display
1127 \ contains=phpComment,phpSemicolonError,phpColonError
1128 \ matchgroup=phpCase start=/\$\@<!\<default\>/ end=/[;:]/
1129 \ matchgroup=Error end=/}/ end=/)/ end=/\]/
1130" \ end=/;\_s*\%([.*\^|&,:!=<>]\|?>\@!\|\/[/*]\@!\|++\@!\|--\@!\)/
1131 else
1132 syn region phpCaseRegion extend keepend contained display
1133 \ contains=phpComment,phpSemicolonError,phpColonError
1134 \ matchgroup=phpCase start=/\$\@<!\<default\>/ end=/[;:]/
1135 endif " }}}2
1136
1137 endif
1138
1139 " if we *aren't* using strict blocks, allow a 'case' or 'default'
1140 " anywhere in regular code
1141 if ! s:strict_blocks
1142 syn cluster phpClCode add=@phpClInSwitch
1143 endif
1144
1145
1146" PHP Syntax: semicolons: {{{1
1147
1148 if s:show_semicolon
1149 " highlight the semicolon anywhere it appears in regular code
1150 syn cluster phpClExpressions add=phpSemicolon
1151 syn match phpSemicolon /;/ contained display contains=phpSemicolonError
1152
1153 " match a semicolon or colon which is followed by one of:
1154 " = ! . +-*/ &|^ < > , ? :
1155 if s:show_semicolon_error
1156 " match a semicolon or colon which is followed by one of:
1157 " = ! . +-*/ &|^ < > , ? :
1158 syn match phpSemicolonError contained display extend
1159 \ ";\_s*\%(\%(\%(//.*$\|#.*$\|/\*\_.\{-}\*/\)\_s*\)*\)\@>\%([.*/\^|&,:!=<>]\|?>\@!\|++\@!\|--\@!\)"
1160 syn match phpColonError contained display extend
1161 \ "::\@!\_s*\%(\%(\%(//.*$\|#.*$\|/\*\_.\{-}\*/\)\_s*\)*\)\@>\%([.*/\^|&,:!=<>]\|?>\@!\|++\@!\|--\@!\)"
1162 endif
1163 hi link phpSemicolonError Error
1164 hi link phpColonError Error
1165
1166 " need to sync back one or two linebreaks to capture the semicolon
1167 " error properly
1168 syn sync linebreaks=2
1169 endif
1170
1171 " a special match for when a semicolon is not allowed here
1172 " Note: this is contained/nextgrouped by other items, not included
1173 " directly
21166df1 1174 if s:no_empty_construct
d99475eb 1175 syn match phpSemicolonNotAllowedHere /;/ contained display
21166df1 1176 endif
21166df1 1177
21166df1 1178
d99475eb 1179" PHP Syntax: constants: {{{1
21166df1 1180
d99475eb
ER
1181 " Magic Constants {{{2
1182 syn cluster phpClConstants add=phpMagicConstant
1183 syn case match
1184 syn keyword phpMagicConstant contained __LINE__ __FILE__ __FUNCTION__ __METHOD__ __CLASS__
1185 syn case ignore
1186 " }}}2
1187
1188 " Built-in Constants {{{2
1189 " TODO: check these against the latest PHP manual
1190 syn cluster phpClConstants add=phpCoreConstant
1191 syn case match
1192 syn keyword phpCoreConstant contained ASSERT_ACTIVE ASSERT_BAIL ASSERT_CALLBACK ASSERT_QUIET_EVAL ASSERT_WARNING
1193 syn keyword phpCoreConstant contained CAL_DOW_DAYNO CAL_DOW_LONG CAL_DOW_SHORT CAL_EASTER_ALWAYS_GREGORIAN CAL_EASTER_ALWAYS_JULIAN CAL_EASTER_DEFAULT CAL_EASTER_ROMAN CAL_FRENCH CAL_GREGORIAN CAL_JULIAN CAL_NUM_CALS CAL_JEWISH CAL_JEWISH_ADD_ALAFIM CAL_JEWISH_ADD_ALAFIM_GERESH CAL_JEWISH_ADD_GERESHAYIM CAL_MONTH_FRENCH CAL_MONTH_GREGORIAN_LONG CAL_MONTH_GREGORIAN_SHORT CAL_MONTH_JEWISH CAL_MONTH_JULIAN_LONG CAL_MONTH_JULIAN_SHORT
1194 syn keyword phpCoreConstant contained CASE_LOWER CASE_UPPER CHAR_MAX
1195 syn keyword phpCoreConstant contained CLSCTX_ALL CLSCTX_INPROC_HANDLER CLSCTX_INPROC_SERVER CLSCTX_LOCAL_SERVER CLSCTX_REMOTE_SERVER CLSCTX_SERVER
1196 syn keyword phpCoreConstant contained CONNECTION_ABORTED CONNECTION_NORMAL CONNECTION_TIMEOUT
1197 syn keyword phpCoreConstant contained COUNT_NORMAL COUNT_RECURSIVE
1198 syn keyword phpCoreConstant contained CP_ACP CP_MACCP CP_OEMCP CP_SYMBOL CP_THREAD_ACP CP_UTF7 CP_UTF8
1199 syn keyword phpCoreConstant contained CREDITS_ALL CREDITS_DOCS CREDITS_FULLPAGE CREDITS_GENERAL CREDITS_GROUP CREDITS_MODULES CREDITS_QA CREDITS_SAPI
1200 syn keyword phpCoreConstant contained CRYPT_BLOWFISH CRYPT_EXT_DES CRYPT_MD5 CRYPT_SALT_LENGTH CRYPT_STD_DES
1201 syn keyword phpCoreConstant contained DATE_ATOM DATE_COOKIE DATE_ISO8601 DATE_RFC1036 DATE_RFC1123 DATE_RFC2822 DATE_RFC822 DATE_RFC850 DATE_RSS DATE_W3C
1202 syn keyword phpCoreConstant contained DEFAULT_INCLUDE_PATH DIRECTORY_SEPARATOR
1203 syn keyword phpCoreConstant contained DISP_E_BADINDEX DISP_E_DIVBYZERO DISP_E_OVERFLOW
1204 syn keyword phpCoreConstant contained DOMSTRING_SIZE_ERR
1205 syn keyword phpCoreConstant contained DOM_HIERARCHY_REQUEST_ERR DOM_INDEX_SIZE_ERR DOM_INUSE_ATTRIBUTE_ERR DOM_INVALID_ACCESS_ERR DOM_INVALID_CHARACTER_ERR DOM_INVALID_MODIFICATION_ERR
1206 syn keyword phpCoreConstant contained DOM_INVALID_STATE_ERR DOM_NAMESPACE_ERR DOM_NOT_FOUND_ERR DOM_NOT_SUPPORTED_ERR DOM_NO_DATA_ALLOWED_ERR DOM_NO_MODIFICATION_ALLOWED_ERR DOM_PHP_ERR
1207 syn keyword phpCoreConstant contained DOM_SYNTAX_ERR DOM_VALIDATION_ERR DOM_WRONG_DOCUMENT_ERR
1208 syn keyword phpCoreConstant contained ENT_COMPAT ENT_NOQUOTES ENT_QUOTES
1209 syn keyword phpCoreConstant contained EXTR_IF_EXISTS EXTR_OVERWRITE EXTR_PREFIX_ALL EXTR_PREFIX_IF_EXISTS EXTR_PREFIX_INVALID EXTR_PREFIX_SAME EXTR_REFS EXTR_SKIP
1210 syn keyword phpCoreConstant contained E_ERROR E_WARNING E_PARSE E_NOTICE E_STRICT E_CORE_ERROR E_CORE_WARNING E_COMPILE_ERROR E_COMPILE_WARNING E_USER_ERROR E_USER_WARNING E_USER_NOTICE E_ALL
1211 syn keyword phpCoreConstant contained FILE_APPEND FILE_IGNORE_NEW_LINES FILE_NO_DEFAULT_CONTEXT FILE_SKIP_EMPTY_LINES FILE_USE_INCLUDE_PATH
1212 syn keyword phpCoreConstant contained FORCE_DEFLATE FORCE_GZIP
1213 syn keyword phpCoreConstant contained FTP_ASCII FTP_AUTORESUME FTP_AUTOSEEK FTP_BINARY FTP_FAILED FTP_FINISHED FTP_IMAGE FTP_MOREDATA FTP_TEXT FTP_TIMEOUT_SEC
1214 syn keyword phpCoreConstant contained GLOB_BRACE GLOB_ERR GLOB_MARK GLOB_NOCHECK GLOB_NOESCAPE GLOB_NOSORT GLOB_ONLYDIR
1215 syn keyword phpCoreConstant contained HTML_ENTITIES HTML_SPECIALCHARS
1216 syn keyword phpCoreConstant contained ICONV_IMPL ICONV_MIME_DECODE_CONTINUE_ON_ERROR ICONV_MIME_DECODE_STRICT ICONV_VERSION
1217 syn keyword phpCoreConstant contained IMAGETYPE_BMP IMAGETYPE_GIF IMAGETYPE_IFF IMAGETYPE_JB2 IMAGETYPE_JP2 IMAGETYPE_JPC IMAGETYPE_JPEG IMAGETYPE_JPEG2000
1218 syn keyword phpCoreConstant contained IMAGETYPE_JPX IMAGETYPE_PNG IMAGETYPE_PSD IMAGETYPE_SWC IMAGETYPE_SWF IMAGETYPE_TIFF_II IMAGETYPE_TIFF_MM IMAGETYPE_WBMP IMAGETYPE_XBM
1219 syn keyword phpCoreConstant contained INF
1220 syn keyword phpCoreConstant contained INFO_ALL INFO_CONFIGURATION INFO_CREDITS INFO_ENVIRONMENT INFO_GENERAL INFO_LICENSE INFO_MODULES INFO_VARIABLES
1221 syn keyword phpCoreConstant contained INI_ALL INI_PERDIR INI_SYSTEM INI_USER
1222 syn keyword phpCoreConstant contained LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY LC_NUMERIC LC_TIME
1223 syn keyword phpCoreConstant contained LIBXML_COMPACT LIBXML_DOTTED_VERSION LIBXML_DTDATTR LIBXML_DTDLOAD LIBXML_DTDVALID LIBXML_ERR_ERROR LIBXML_ERR_FATAL LIBXML_ERR_NONE
1224 syn keyword phpCoreConstant contained LIBXML_ERR_WARNING LIBXML_NOBLANKS LIBXML_NOCDATA LIBXML_NOEMPTYTAG LIBXML_NOENT LIBXML_NOERROR LIBXML_NONET LIBXML_NOWARNING
1225 syn keyword phpCoreConstant contained LIBXML_NOXMLDECL LIBXML_NSCLEAN LIBXML_VERSION LIBXML_XINCLUDE
1226 syn keyword phpCoreConstant contained LOCK_EX LOCK_NB LOCK_SH LOCK_UN
1227 syn keyword phpCoreConstant contained LOG_ALERT LOG_AUTH LOG_AUTHPRIV LOG_CONS LOG_CRIT LOG_CRON LOG_DAEMON LOG_DEBUG
1228 syn keyword phpCoreConstant contained LOG_EMERG LOG_ERR LOG_INFO LOG_KERN LOG_LPR LOG_MAIL LOG_NDELAY LOG_NEWS
1229 syn keyword phpCoreConstant contained LOG_NOTICE LOG_NOWAIT LOG_ODELAY LOG_PERROR LOG_PID LOG_SYSLOG LOG_USER LOG_UUCP LOG_WARNING
1230 syn keyword phpCoreConstant contained MK_E_UNAVAILABLE
1231 syn keyword phpCoreConstant contained MYSQL_ASSOC MYSQL_BOTH MYSQL_CLIENT_COMPRESS MYSQL_CLIENT_IGNORE_SPACE MYSQL_CLIENT_INTERACTIVE MYSQL_CLIENT_SSL MYSQL_NUM
1232 syn keyword phpCoreConstant contained M_1_PI M_2_PI M_2_SQRTPI M_E M_LN10 M_LN2 M_LOG10E M_LOG2E M_PI M_PI_2 M_PI_4 M_SQRT1_2 M_SQRT2
1233 syn keyword phpCoreConstant contained NAN
1234 syn keyword phpCoreConstant contained NORM_IGNORECASE NORM_IGNOREKANATYPE NORM_IGNORENONSPACE NORM_IGNORESYMBOLS NORM_IGNOREWIDTH
1235 syn keyword phpCoreConstant contained ODBC_BINMODE_CONVERT ODBC_BINMODE_PASSTHRU ODBC_BINMODE_RETURN ODBC_TYPE
1236 syn keyword phpCoreConstant contained PATHINFO_BASENAME PATHINFO_DIRNAME PATHINFO_EXTENSION
1237 syn keyword phpCoreConstant contained PATH_SEPARATOR
1238 syn keyword phpCoreConstant contained PEAR_INSTALL_DIR PEAR_EXTENSION_DIR
1239 syn keyword phpCoreConstant contained PHP_PREFIX PHP_BINDIR PHP_CONFIG_FILE_PATH PHP_CONFIG_FILE_SCAN_DIR PHP_DATADIR PHP_EXTENSION_DIR PHP_LIBDIR PHP_LOCALSTATEDIR PHP_SYSCONFDIR PHP_SHLIB_SUFFIX
1240 syn keyword phpCoreConstant contained PHP_OUTPUT_HANDLER_CONT PHP_OUTPUT_HANDLER_END PHP_OUTPUT_HANDLER_START
1241 syn keyword phpCoreConstant contained PHP_URL_FRAGMENT PHP_URL_HOST PHP_URL_PASS PHP_URL_PATH PHP_URL_PORT PHP_URL_QUERY PHP_URL_SCHEME PHP_URL_USER
1242 syn keyword phpCoreConstant contained PHP_VERSION PHP_OS PHP_SAPI PHP_EOL PHP_INT_MAX PHP_INT_SIZE
1243 syn keyword phpCoreConstant contained PREG_GREP_INVERT PREG_OFFSET_CAPTURE PREG_PATTERN_ORDER PREG_SET_ORDER PREG_SPLIT_DELIM_CAPTURE PREG_SPLIT_NO_EMPTY PREG_SPLIT_OFFSET_CAPTURE
1244 syn keyword phpCoreConstant contained PSFS_ERR_FATAL PSFS_FEED_ME PSFS_FLAG_FLUSH_CLOSE PSFS_FLAG_FLUSH_INC PSFS_FLAG_NORMAL PSFS_PASS_ON
1245 syn keyword phpCoreConstant contained SEEK_CUR SEEK_END SEEK_SET
1246 syn keyword phpCoreConstant contained SORT_ASC SORT_DESC SORT_LOCALE_STRING SORT_NUMERIC SORT_REGULAR SORT_STRING
1247 syn keyword phpCoreConstant contained SQL_BIGINT SQL_BINARY SQL_BIT SQL_CHAR SQL_CONCURRENCY SQL_CONCUR_LOCK SQL_CONCUR_READ_ONLY SQL_CONCUR_ROWVER SQL_CONCUR_VALUES
1248 syn keyword phpCoreConstant contained SQL_CURSOR_DYNAMIC SQL_CURSOR_FORWARD_ONLY SQL_CURSOR_KEYSET_DRIVEN SQL_CURSOR_STATIC SQL_CURSOR_TYPE SQL_CUR_USE_DRIVER SQL_CUR_USE_IF_NEEDED SQL_CUR_USE_ODBC
1249 syn keyword phpCoreConstant contained SQL_DATE SQL_DECIMAL SQL_DOUBLE SQL_FETCH_FIRST SQL_FETCH_NEXT SQL_FLOAT SQL_INTEGER SQL_KEYSET_SIZE
1250 syn keyword phpCoreConstant contained SQL_LONGVARBINARY SQL_LONGVARCHAR SQL_NUMERIC SQL_ODBC_CURSORS SQL_REAL SQL_SMALLINT SQL_TIME SQL_TIMESTAMP SQL_TINYINT SQL_VARBINARY SQL_VARCHAR
1251 syn keyword phpCoreConstant contained STDERR STDIN STDOUT
1252 syn keyword phpCoreConstant contained STREAM_CLIENT_ASYNC_CONNECT STREAM_CLIENT_CONNECT STREAM_CLIENT_PERSISTENT
1253 syn keyword phpCoreConstant contained STREAM_CRYPTO_METHOD_SSLv23_CLIENT STREAM_CRYPTO_METHOD_SSLv23_SERVER STREAM_CRYPTO_METHOD_SSLv2_CLIENT STREAM_CRYPTO_METHOD_SSLv2_SERVER STREAM_CRYPTO_METHOD_SSLv3_CLIENT STREAM_CRYPTO_METHOD_SSLv3_SERVER STREAM_CRYPTO_METHOD_TLS_CLIENT STREAM_CRYPTO_METHOD_TLS_SERVER
1254 syn keyword phpCoreConstant contained STREAM_ENFORCE_SAFE_MODE STREAM_FILTER_ALL STREAM_FILTER_READ STREAM_FILTER_WRITE STREAM_IGNORE_URL
1255 syn keyword phpCoreConstant contained STREAM_IPPROTO_ICMP STREAM_IPPROTO_IP STREAM_IPPROTO_RAW STREAM_IPPROTO_TCP STREAM_IPPROTO_UDP STREAM_MKDIR_RECURSIVE STREAM_MUST_SEEK
1256 syn keyword phpCoreConstant contained STREAM_NOTIFY_AUTH_REQUIRED STREAM_NOTIFY_AUTH_RESULT STREAM_NOTIFY_COMPLETED STREAM_NOTIFY_CONNECT STREAM_NOTIFY_FAILURE STREAM_NOTIFY_FILE_SIZE_IS STREAM_NOTIFY_MIME_TYPE_IS
1257 syn keyword phpCoreConstant contained STREAM_NOTIFY_PROGRESS STREAM_NOTIFY_REDIRECTED STREAM_NOTIFY_RESOLVE STREAM_NOTIFY_SEVERITY_ERR STREAM_NOTIFY_SEVERITY_INFO STREAM_NOTIFY_SEVERITY_WARN
1258 syn keyword phpCoreConstant contained STREAM_OOB STREAM_PEEK STREAM_PF_INET STREAM_PF_INET6 STREAM_PF_UNIX STREAM_REPORT_ERRORS STREAM_SERVER_BIND STREAM_SERVER_LISTEN
1259 syn keyword phpCoreConstant contained STREAM_SOCK_DGRAM STREAM_SOCK_RAW STREAM_SOCK_RDM STREAM_SOCK_SEQPACKET STREAM_SOCK_STREAM STREAM_URL_STAT_LINK STREAM_URL_STAT_QUIET STREAM_USE_PATH
1260 syn keyword phpCoreConstant contained STR_PAD_BOTH STR_PAD_LEFT STR_PAD_RIGHT
1261 syn keyword phpCoreConstant contained SUNFUNCS_RET_DOUBLE SUNFUNCS_RET_STRING SUNFUNCS_RET_TIMESTAMP
1262 syn keyword phpCoreConstant contained T_ABSTRACT T_AND_EQUAL T_ARRAY T_ARRAY_CAST T_AS T_BAD_CHARACTER T_BOOLEAN_AND T_BOOLEAN_OR T_BOOL_CAST T_BREAK T_CASE T_CATCH
1263 syn keyword phpCoreConstant contained T_CHARACTER T_CLASS T_CLASS_C T_CLONE T_CLOSE_TAG T_COMMENT T_CONCAT_EQUAL T_CONST T_CONSTANT_ENCAPSED_STRING T_CONTINUE
1264 syn keyword phpCoreConstant contained T_CURLY_OPEN T_DEC T_DECLARE T_DEFAULT T_DIV_EQUAL T_DNUMBER T_DO T_DOC_COMMENT T_DOLLAR_OPEN_CURLY_BRACES T_DOUBLE_ARROW
1265 syn keyword phpCoreConstant contained T_DOUBLE_CAST T_DOUBLE_COLON T_ECHO T_ELSE T_ELSEIF T_EMPTY T_ENCAPSED_AND_WHITESPACE T_ENDDECLARE T_ENDFOR T_ENDFOREACH
1266 syn keyword phpCoreConstant contained T_ENDIF T_ENDSWITCH T_ENDWHILE T_END_HEREDOC T_EVAL T_EXIT T_EXTENDS T_FILE T_FINAL T_FOR T_FOREACH T_FUNCTION T_FUNC_C
1267 syn keyword phpCoreConstant contained T_GLOBAL T_HALT_COMPILER T_IF T_IMPLEMENTS T_INC T_INCLUDE T_INCLUDE_ONCE T_INLINE_HTML T_INSTANCEOF T_INTERFACE T_INT_CAST
1268 syn keyword phpCoreConstant contained T_ISSET T_IS_EQUAL T_IS_GREATER_OR_EQUAL T_IS_IDENTICAL T_IS_NOT_EQUAL T_IS_NOT_IDENTICAL T_IS_SMALLER_OR_EQUAL T_LINE T_LIST
1269 syn keyword phpCoreConstant contained T_LNUMBER T_LOGICAL_AND T_LOGICAL_OR T_LOGICAL_XOR T_METHOD_C T_MINUS_EQUAL T_MOD_EQUAL T_MUL_EQUAL T_NEW T_NUM_STRING T_OBJECT_CAST
1270 syn keyword phpCoreConstant contained T_OBJECT_OPERATOR T_OPEN_TAG T_OPEN_TAG_WITH_ECHO T_OR_EQUAL T_PAAMAYIM_NEKUDOTAYIM T_PLUS_EQUAL T_PRINT T_PRIVATE T_PROTECTED T_PUBLIC
1271 syn keyword phpCoreConstant contained T_REQUIRE T_REQUIRE_ONCE T_RETURN T_SL T_SL_EQUAL T_SR T_SR_EQUAL T_START_HEREDOC T_STATIC T_STRING T_STRING_CAST T_STRING_VARNAME
1272 syn keyword phpCoreConstant contained T_SWITCH T_THROW T_TRY T_UNSET T_UNSET_CAST T_USE T_VAR T_VARIABLE T_WHILE T_WHITESPACE T_XOR_EQUAL
1273 syn keyword phpCoreConstant contained UPLOAD_ERR_CANT_WRITE UPLOAD_ERR_FORM_SIZE UPLOAD_ERR_INI_SIZE UPLOAD_ERR_NO_FILE UPLOAD_ERR_NO_TMP_DIR UPLOAD_ERR_OK UPLOAD_ERR_PARTIAL
1274 syn keyword phpCoreConstant contained VARCMP_EQ VARCMP_GT VARCMP_LT VARCMP_NULL
1275 syn keyword phpCoreConstant contained VT_ARRAY VT_BOOL VT_BSTR VT_BYREF VT_CY VT_DATE VT_DECIMAL VT_DISPATCH VT_EMPTY VT_ERROR VT_I1 VT_I2 VT_I4 VT_INT VT_NULL VT_R4 VT_R8 VT_UI1 VT_UI2 VT_UI4 VT_UINT VT_UNKNOWN VT_VARIANT
1276 syn keyword phpCoreConstant contained XML_ATTRIBUTE_CDATA XML_ATTRIBUTE_DECL_NODE XML_ATTRIBUTE_ENTITY XML_ATTRIBUTE_ENUMERATION XML_ATTRIBUTE_ID XML_ATTRIBUTE_IDREF
1277 syn keyword phpCoreConstant contained XML_ATTRIBUTE_IDREFS XML_ATTRIBUTE_NMTOKEN XML_ATTRIBUTE_NMTOKENS XML_ATTRIBUTE_NODE XML_ATTRIBUTE_NOTATION XML_CDATA_SECTION_NODE
1278 syn keyword phpCoreConstant contained XML_COMMENT_NODE XML_DOCUMENT_FRAG_NODE XML_DOCUMENT_NODE XML_DOCUMENT_TYPE_NODE XML_DTD_NODE XML_ELEMENT_DECL_NODE XML_ELEMENT_NODE
1279 syn keyword phpCoreConstant contained XML_ENTITY_DECL_NODE XML_ENTITY_NODE XML_ENTITY_REF_NODE XML_ERROR_ASYNC_ENTITY XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF XML_ERROR_BAD_CHAR_REF
1280 syn keyword phpCoreConstant contained XML_ERROR_BINARY_ENTITY_REF XML_ERROR_DUPLICATE_ATTRIBUTE XML_ERROR_EXTERNAL_ENTITY_HANDLING XML_ERROR_INCORRECT_ENCODING XML_ERROR_INVALID_TOKEN
1281 syn keyword phpCoreConstant contained XML_ERROR_JUNK_AFTER_DOC_ELEMENT XML_ERROR_MISPLACED_XML_PI XML_ERROR_NONE XML_ERROR_NO_ELEMENTS XML_ERROR_NO_MEMORY XML_ERROR_PARAM_ENTITY_REF
1282 syn keyword phpCoreConstant contained XML_ERROR_PARTIAL_CHAR XML_ERROR_RECURSIVE_ENTITY_REF XML_ERROR_SYNTAX XML_ERROR_TAG_MISMATCH XML_ERROR_UNCLOSED_CDATA_SECTION
1283 syn keyword phpCoreConstant contained XML_ERROR_UNCLOSED_TOKEN XML_ERROR_UNDEFINED_ENTITY XML_ERROR_UNKNOWN_ENCODING XML_HTML_DOCUMENT_NODE XML_LOCAL_NAMESPACE
1284 syn keyword phpCoreConstant contained XML_NAMESPACE_DECL_NODE XML_NOTATION_NODE XML_OPTION_CASE_FOLDING XML_OPTION_SKIP_TAGSTART XML_OPTION_SKIP_WHITE XML_OPTION_TARGET_ENCODING
1285 syn keyword phpCoreConstant contained XML_PI_NODE XML_SAX_IMPL XML_TEXT_NODE
1286 syn keyword phpCoreConstant contained ZEND_THREAD_SAFE
1287 syn case ignore
1288 " }}}2
1289
1290" PHP Syntax: functions {{{1
1291
1292 " TODO: move constants out of here - they need to be case-sensitive
1293
1294 " Function and Methods ripped from php_manual_de.tar.gz Jan 2003 {{{2
1295 " TODO: check these against the latest PHP manual
1296 syn cluster phpClFunctions add=phpFunctions
1297
1298 " Apache
1299 syn keyword phpFunctions contained apache_child_terminate apache_get_modules apache_get_version apache_getenv apache_lookup_uri apache_note apache_request_headers apache_reset_timeout apache_response_headers apache_setenv ascii2ebcdic ebcdic2ascii getallheaders virtual
1300
1301 " APC Alternative PHP Cache
1302 syn keyword phpFunctions contained apc_add apc_cache_info apc_clear_cache apc_compile_file apc_define_constants apc_delete apc_fetch apc_load_constants apc_sma_info apc_store
1303
1304 " APD Advanced PHP Debugger
1305 syn keyword phpCoreConstant contained FUNCTION_TRACE ARGS_TRACE ASSIGNMENT_TRACE STATEMENT_TRACE MEMORY_TRACE TIMING_TRACE SUMMARY_TRACE ERROR_TRACE PROF_TRACE APD_VERSION
1306 syn keyword phpFunctions contained apd_breakpoint apd_callstack apd_clunk apd_continue apd_croak apd_dump_function_table apd_dump_persistent_resources apd_dump_regular_resources apd_echo apd_get_active_symbols apd_set_pprof_trace apd_set_session_trace apd_set_session apd_set_socket_session_trace override_function rename_function
1307
1308 " array functions
1309 syn keyword phpCoreConstant contained CASE_LOWER CASE_UPPER SORT_ASC SORT_DESC SORT_REGULAR SORT_NUMERIC SORT_STRING SORT_LOCALE_STRING COUNT_NORMAL COUNT_RECURSIVE EXTR_OVERWRITE EXTR_SKIP EXTR_PREFIX_SAME EXTR_PREFIX_ALL EXTR_PREFIX_INVALID EXTR_PREFIX_IF_EXISTS EXTR_IF_EXISTS EXTR_REFS
1310 syn keyword phpFunctions contained array_change_key_case array_chunk array_combine array_count_values array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_diff array_fill_keys array_fill array_filter array_flip array_intersect_assoc array_intersect_key array_intersect_uassoc array_intersect_ukey array_intersect array_key_exists array_keys array_map array_merge_recursive array_merge array_multisort array_pad array_pop array_product array_push array_rand array_reduce array_reverse array_search array_shift array_slice array_splice array_sum array_udiff_assoc array_udiff_uassoc array_udiff array_uintersect_assoc array_uintersect_uassoc array_uintersect array_unique array_unshift array_values array_walk_recursive array_walk arsort asort compact count current each end extract in_array key krsort ksort natcasesort natsort next pos prev range reset rsort shuffle sizeof sort uasort uksort usort
1311
1312 " NOTE: aspell is deprecated as of PHP 4.3.0
1313 " syn keyword phpFunctions aspell_check aspell_new aspell_suggest contained
1314
1315 " BBCode
1316 syn keyword phpCoreConstant contained BBCODE_TYPE_NOARG BBCODE_TYPE_SINGLE BBCODE_TYPE_ARG BBCODE_TYPE_OPTARG BBCODE_TYPE_ROOT BBCODE_FLAGS_ARG_PARSING BBCODE_FLAGS_CDATA_NOT_ALLOWED BBCODE_FLAGS_SMILEYS_ON BBCODE_FLAGS_SMILEYS_OFF BBCODE_FLAGS_ONE_OPEN_PER_LEVEL BBCODE_FLAGS_REMOVE_IF_EMPTY BBCODE_FLAGS_DENY_REOPEN_CHILD BBCODE_ARG_DOUBLE_QUOTE BBCODE_ARG_SINGLE_QUOTE BBCODE_ARG_HTML_QUOTE BBCODE_AUTO_CORRECT BBCODE_CORRECT_REOPEN_TAGS BBCODE_DISABLE_TREE_BUILD BBCODE_DEFAULT_SMILEYS_ON BBCODE_DEFAULT_SMILEYS_OFF BBCODE_FORCE_SMILEYS_OFF BBCODE_SMILEYS_CASE_INSENSITIVE BBCODE_SET_FLAGS_SET BBCODE_SET_FLAGS_ADD BBCODE_SET_FLAGS_REMOVE
1317 syn keyword phpFunctions contained bbcode_add_element bbcode_add_smiley bbcode_create bbcode_destroy bbcode_parse bbcode_set_arg_parser bbcode_set_flags
1318
1319 " BC Math
1320 syn keyword phpFunctions contained bcadd bccomp bcdiv bcmod bcmul bcpow bcpowmod bcscale bcsqrt bcsub
1321
1322 " BZip2
1323 syn keyword phpFunctions contained bzclose bzcompress bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite
1324
1325 " Calendar functions
1326 syn keyword phpCoreConstant contained CAL_GREGORIAN CAL_JULIAN CAL_JEWISH CAL_FRENCH CAL_NUM_CALS CAL_DOW_DAYNO CAL_DOW_SHORT CAL_DOW_LONG CAL_MONTH_GREGORIAN_SHORT CAL_MONTH_GREGORIAN_LONG CAL_MONTH_JULIAN_SHORT CAL_MONTH_JULIAN_LONG CAL_MONTH_JEWISH CAL_MONTH_FRENCH CAL_EASTER_DEFAULT CAL_EASTER_ROMAN CAL_EASTER_ALWAYS_GREGORIAN CAL_EASTER_ALWAYS_JULIAN CAL_JEWISH_ADD_ALAFIM_GERESH CAL_JEWISH_ADD_ALAFIM CAL_JEWISH_ADD_GERESHAYIM
1327 syn keyword phpFunctions contained cal_days_in_month cal_from_jd cal_info cal_to_jd easter_date easter_days FrenchToJD GregorianToJD JDDayOfWeek JDMonthName JDToFrench JDToGregorian jdtojewish JDToJulian jdtounix JewishToJD JulianToJD unixtojd
1328
1329 " NOTE: CCVS has been deprecated as of PHP 4.3.0
1330 " syn keyword phpFunctions ccvs_add ccvs_auth ccvs_command ccvs_count ccvs_delete ccvs_done ccvs_init ccvs_lookup ccvs_new ccvs_report ccvs_return ccvs_reverse ccvs_sale ccvs_status ccvs_textvalue ccvs_void contained
1331
1332 " Classes / Objects
1333 " NOTE: call_user_method_array() and call_user_method() are both deprecated ...
1334 syn keyword phpFunctions contained class_exists get_class_methods get_class_vars get_class get_declared_classes get_declared_interfaces get_object_vars get_parent_class interface_exists is_a is_subclass_of method_exists property_exists
1335
1336 " COM
1337 syn keyword phpCoreConstant contained CLSCTX_INPROC_SERVER CLSCTX_INPROC_HANDLER CLSCTX_LOCAL_SERVER CLSCTX_REMOTE_SERVER CLSCTX_SERVER CLSCTX_ALL VT_NULL VT_EMPTY VT_UI1 VT_I2 VT_I4 VT_R4 VT_R8 VT_BOOL VT_ERROR VT_CY VT_DATE VT_BSTR VT_DECIMAL VT_UNKNOWN VT_DISPATCH VT_VARIANT VT_I1 VT_UI2 VT_UI4 VT_INT VT_UINT VT_ARRAY VT_BYREF CP_ACP CP_MACCP CP_OEMCP CP_UTF7 CP_UTF8 CP_SYMBOL CP_THREAD_ACP VARCMP_LT VARCMP_EQ VARCMP_GT VARCMP_NULL NORM_IGNORECASE NORM_IGNORENONSPACE NORM_IGNORESYMBOLS NORM_IGNOREWIDTH NORM_IGNOREKANATYPE NORM_IGNOREKASHIDA DISP_E_DIVBYZERO DISP_E_OVERFLOW MK_E_UNAVAILABLE
1338 syn keyword phpClasses contained COM DOTNET VARIANT
1339 syn keyword phpFunctions contained com_addref com_create_guid com_event_sink com_get_active_object com_get com_invoke com_isenum com_load_typelib com_load com_message_pump com_print_typeinfo com_propget com_propput com_propset com_release com_set variant_abs variant_add variant_and variant_cast variant_cat variant_cmp variant_date_from_timestamp variant_date_to_timestamp variant_div variant_eqv variant_fix variant_get_type variant_idiv variant_imp variant_int variant_mod variant_mul variant_neg variant_not variant_or variant_pow variant_round variant_set_type variant_set variant_sub variant_xor
1340
1341 " Crack functions
1342 syn keyword phpFunctions contained crack_check crack_closedict crack_getlastmessage crack_opendict
1343
1344 " Character type functions
1345 syn keyword phpFunctions contained ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_graph ctype_lower ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit
1346
1347 " cURL
1348 syn keyword phpCoreConstant contained CURLOPT_AUTOREFERER CURLOPT_COOKIESESSION CURLOPT_DNS_USE_GLOBAL_CACHE CURLOPT_DNS_CACHE_TIMEOUT CURLOPT_FTP_SSL CURLFTPSSL_TRY CURLFTPSSL_ALL CURLFTPSSL_CONTROL CURLFTPSSL_NONE CURLOPT_PRIVATE CURLOPT_FTPSSLAUTH CURLOPT_PORT CURLOPT_FILE CURLOPT_INFILE CURLOPT_INFILESIZE CURLOPT_URL CURLOPT_PROXY CURLOPT_VERBOSE CURLOPT_HEADER CURLOPT_HTTPHEADER CURLOPT_NOPROGRESS CURLOPT_NOBODY CURLOPT_FAILONERROR CURLOPT_UPLOAD CURLOPT_POST CURLOPT_FTPLISTONLY CURLOPT_FTPAPPEND CURLOPT_FTP_CREATE_MISSING_DIRS CURLOPT_NETRC CURLOPT_FOLLOWLOCATION CURLOPT_FTPASCII CURLOPT_PUT CURLOPT_MUTE CURLOPT_USERPWD CURLOPT_PROXYUSERPWD CURLOPT_RANGE CURLOPT_TIMEOUT CURLOPT_TIMEOUT_MS CURLOPT_TCP_NODELAY CURLOPT_POSTFIELDS CURLOPT_REFERER CURLOPT_USERAGENT CURLOPT_FTPPORT CURLOPT_FTP_USE_EPSV CURLOPT_LOW_SPEED_LIMIT CURLOPT_LOW_SPEED_TIME CURLOPT_RESUME_FROM CURLOPT_COOKIE CURLOPT_SSLCERT CURLOPT_SSLCERTPASSWD CURLOPT_WRITEHEADER CURLOPT_SSL_VERIFYHOST CURLOPT_COOKIEFILE CURLOPT_SSLVERSION CURLOPT_TIMECONDITION CURLOPT_TIMEVALUE CURLOPT_CUSTOMREQUEST CURLOPT_STDERR CURLOPT_TRANSFERTEXT CURLOPT_RETURNTRANSFER CURLOPT_QUOTE CURLOPT_POSTQUOTE CURLOPT_INTERFACE CURLOPT_KRB4LEVEL CURLOPT_HTTPPROXYTUNNEL CURLOPT_FILETIME CURLOPT_WRITEFUNCTION CURLOPT_READFUNCTION CURLOPT_PASSWDFUNCTION CURLOPT_HEADERFUNCTION CURLOPT_MAXREDIRS CURLOPT_MAXCONNECTS CURLOPT_CLOSEPOLICY CURLOPT_FRESH_CONNECT CURLOPT_FORBID_REUSE CURLOPT_RANDOM_FILE CURLOPT_EGDSOCKET CURLOPT_CONNECTTIMEOUT CURLOPT_CONNECTTIMEOUT_MS CURLOPT_SSL_VERIFYPEER CURLOPT_CAINFO CURLOPT_CAPATH CURLOPT_COOKIEJAR CURLOPT_SSL_CIPHER_LIST CURLOPT_BINARYTRANSFER CURLOPT_NOSIGNAL CURLOPT_PROXYTYPE CURLOPT_BUFFERSIZE CURLOPT_HTTPGET CURLOPT_HTTP_VERSION CURLOPT_SSLKEY CURLOPT_SSLKEYTYPE CURLOPT_SSLKEYPASSWD CURLOPT_SSLENGINE CURLOPT_SSLENGINE_DEFAULT CURLOPT_SSLCERTTYPE CURLOPT_CRLF CURLOPT_ENCODING CURLOPT_PROXYPORT CURLOPT_UNRESTRICTED_AUTH CURLOPT_FTP_USE_EPRT CURLOPT_HTTP200ALIASES CURLOPT_HTTPAUTH CURLAUTH_BASIC
1349 syn keyword phpCoreConstant contained CURLAUTH_DIGEST CURLAUTH_GSSNEGOTIATE CURLAUTH_NTLM CURLAUTH_ANY CURLAUTH_ANYSAFE CURLOPT_PROXYAUTH CURLCLOSEPOLICY_LEAST_RECENTLY_USED CURLCLOSEPOLICY_LEAST_TRAFFIC CURLCLOSEPOLICY_SLOWEST CURLCLOSEPOLICY_CALLBACK CURLCLOSEPOLICY_OLDEST CURLINFO_PRIVATE CURLINFO_EFFECTIVE_URL CURLINFO_HTTP_CODE CURLINFO_HEADER_OUT CURLINFO_HEADER_SIZE CURLINFO_REQUEST_SIZE CURLINFO_TOTAL_TIME CURLINFO_NAMELOOKUP_TIME CURLINFO_CONNECT_TIME CURLINFO_PRETRANSFER_TIME CURLINFO_SIZE_UPLOAD CURLINFO_SIZE_DOWNLOAD CURLINFO_SPEED_DOWNLOAD CURLINFO_SPEED_UPLOAD CURLINFO_FILETIME CURLINFO_SSL_VERIFYRESULT CURLINFO_CONTENT_LENGTH_DOWNLOAD CURLINFO_CONTENT_LENGTH_UPLOAD CURLINFO_STARTTRANSFER_TIME CURLINFO_CONTENT_TYPE CURLINFO_REDIRECT_TIME CURLINFO_REDIRECT_COUNT CURL_TIMECOND_IFMODSINCE CURL_TIMECOND_IFUNMODSINCE CURL_TIMECOND_LASTMOD CURL_VERSION_IPV6 CURL_VERSION_KERBEROS4 CURL_VERSION_SSL CURL_VERSION_LIBZ CURLVERSION_NOW CURLE_OK CURLE_UNSUPPORTED_PROTOCOL CURLE_FAILED_INIT CURLE_URL_MALFORMAT CURLE_URL_MALFORMAT_USER CURLE_COULDNT_RESOLVE_PROXY CURLE_COULDNT_RESOLVE_HOST CURLE_COULDNT_CONNECT CURLE_FTP_WEIRD_SERVER_REPLY CURLE_FTP_ACCESS_DENIED CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_FTP_WEIRD_PASS_REPLY CURLE_FTP_WEIRD_USER_REPLY CURLE_FTP_WEIRD_PASV_REPLY CURLE_FTP_WEIRD_227_FORMAT CURLE_FTP_CANT_GET_HOST CURLE_FTP_CANT_RECONNECT CURLE_FTP_COULDNT_SET_BINARY CURLE_PARTIAL_FILE CURLE_FTP_COULDNT_RETR_FILE CURLE_FTP_WRITE_ERROR CURLE_FTP_QUOTE_ERROR CURLE_HTTP_NOT_FOUND CURLE_WRITE_ERROR CURLE_MALFORMAT_USER CURLE_FTP_COULDNT_STOR_FILE CURLE_READ_ERROR CURLE_OUT_OF_MEMORY CURLE_OPERATION_TIMEOUTED CURLE_FTP_COULDNT_SET_ASCII CURLE_FTP_PORT_FAILED CURLE_FTP_COULDNT_USE_REST CURLE_FTP_COULDNT_GET_SIZE CURLE_HTTP_RANGE_ERROR CURLE_HTTP_POST_ERROR CURLE_SSL_CONNECT_ERROR CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_FILE_COULDNT_READ_FILE CURLE_LDAP_CANNOT_BIND CURLE_LDAP_SEARCH_FAILED CURLE_LIBRARY_NOT_FOUND CURLE_FUNCTION_NOT_FOUND CURLE_ABORTED_BY_CALLBACK CURLE_BAD_FUNCTION_ARGUMENT CURLE_BAD_CALLING_ORDER CURLE_HTTP_PORT_FAILED CURLE_BAD_PASSWORD_ENTERED CURLE_TOO_MANY_REDIRECTS CURLE_UNKNOWN_TELNET_OPTION CURLE_TELNET_OPTION_SYNTAX CURLE_OBSOLETE CURLE_SSL_PEER_CERTIFICATE CURLE_GOT_NOTHING CURLE_SSL_ENGINE_NOTFOUND CURLE_SSL_ENGINE_SETFAILED CURLE_SEND_ERROR CURLE_RECV_ERROR CURLE_SHARE_IN_USE CURLE_SSL_CERTPROBLEM CURLE_SSL_CIPHER CURLE_SSL_CACERT CURLE_BAD_CONTENT_ENCODING CURLE_LDAP_INVALID_URL CURLE_FILESIZE_EXCEEDED CURLE_FTP_SSL_FAILED CURLFTPAUTH_DEFAULT CURLFTPAUTH_SSL CURLFTPAUTH_TLS CURLPROXY_HTTP CURLPROXY_SOCKS5 CURL_NETRC_OPTIONAL CURL_NETRC_IGNORED CURL_NETRC_REQUIRED CURL_HTTP_VERSION_NONE CURL_HTTP_VERSION_1_0 CURL_HTTP_VERSION_1_1 CURLM_CALL_MULTI_PERFORM CURLM_OK CURLM_BAD_HANDLE CURLM_BAD_EASY_HANDLE CURLM_OUT_OF_MEMORY CURLM_INTERNAL_ERROR CURLMSG_DONE
1350 syn keyword phpFunctions contained curl_close curl_copy_handle curl_errno curl_error curl_exec curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_setopt_array curl_setopt curl_version
1351
1352 " Cybercash
1353 syn keyword phpFunctions contained cybercash_base64_decode cybercash_base64_encode cybercash_decr cybercash_encr
1354
1355 " Cybermut
1356 syn keyword phpFunctions contained cybermut_creerformulairecm cybermut_creerreponsecm cybermut_testmac
1357
1358 " Cyrus IMAP administration
1359 syn keyword phpCoreConstant contained CYRUS_CONN_NONSYNCLITERAL CYRUS_CONN_INITIALRESPONSE CYRUS_CALLBACK_NUMBERED CYRUS_CALLBACK_NOLITERAL
1360 syn keyword phpFunctions contained cyrus_authenticate cyrus_bind cyrus_close cyrus_connect cyrus_query cyrus_unbind
1361
1362 " Date/Time functions
1363 syn keyword phpCoreConstant contained DATE_ATOM DATE_COOKIE DATE_ISO8601 DATE_RFC822 DATE_RFC850 DATE_RFC1036 DATE_RFC1123 DATE_RFC2822 DATE_RFC3339 DATE_RSS DATE_W3C SUNFUNCS_RET_TIMESTAMP SUNFUNCS_RET_STRING SUNFUNCS_RET_DOUBLE
1364 syn keyword phpFunctions contained checkdate date_create date_date_set date_default_timezone_get date_default_timezone_set date_format date_isodate_set date_modify date_offset_get date_parse date_sun_info date_sunrise date_sunset date_time_set date_timezone_get date_timezone_set date getdate gettimeofday gmdate gmmktime gmstrftime idate localtime microtime mktime strftime strptime strtotime time timezone_abbreviations_list timezone_identifiers_list timezone_name_from_abbr timezone_name_get timezone_offset_get timezone_open timezone_transitions_get
1365 syn keyword phpClasses contained DateTime DateTimeZone
1366
1367 " Database (dbm-style) Abstraction Layer Functions
1368 syn keyword phpFunctions contained dba_close dba_delete dba_exists dba_fetch dba_firstkey dba_handlers dba_insert dba_key_split dba_list dba_nextkey dba_open dba_optimize dba_popen dba_replace dba_sync
1369
1370 " dBase functions
1371 syn keyword phpFunctions contained dbase_add_record dbase_close dbase_create dbase_delete_record dbase_get_header_info dbase_get_record_with_names dbase_get_record dbase_numfields dbase_numrecords dbase_open dbase_pack dbase_replace_record
1372
1373 " NOTE: DBM functions are deprecated as of PHP 5.0
1374 " syn keyword phpFunctions contained dblist dbmclose dbmdelete dbmexists dbmfetch dbmfirstkey dbminsert dbmnextkey dbmopen dbmreplace
1375
1376 " DBX Functions
1377 syn keyword phpCoreConstant contained DBX_MYSQL DBX_ODBC DBX_PGSQL DBX_MSSQL DBX_FBSQL DBX_OCI8 DBX_SYBASECT DBX_SQLITE DBX_PERSISTENT DBX_RESULT_INFO DBX_RESULT_INDEX DBX_RESULT_ASSOC DBX_RESULT_UNBUFFERED DBX_COLNAMES_UNCHANGED DBX_COLNAMES_UPPERCASE DBX_COLNAMES_LOWERCASE DBX_CMP_NATIVE DBX_CMP_TEXT DBX_CMP_NUMBER DBX_CMP_ASC DBX_CMP_DESC
1378 syn keyword phpFunctions contained dbx_close dbx_compare dbx_connect dbx_error dbx_escape_string dbx_fetch_row dbx_query dbx_sort
1379
1380 " Direct I/O functions
1381 " NOTE: this extension also defines the constant 'c', but I am not declaring
1382 " it here because most people will never use it ...
1383 syn keyword phpCoreConstant contained F_DUPFD F_GETFD F_GETFL F_GETLK F_GETOWN F_RDLCK F_SETFL F_SETLK F_SETLKW F_SETOWN F_UNLCK F_WRLCK O_APPEND O_ASYNC O_CREAT O_EXCL O_NDELAY O_NOCTTY O_NONBLOCK O_RDONLY O_RDWR O_SYNC O_TRUNC O_WRONLY S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR
1384 syn keyword phpFunctions contained dio_close dio_fcntl dio_open dio_read dio_seek dio_stat dio_tcsetattr dio_truncate dio_write
1385
1386 " Directory functions
1387 syn keyword phpCoreConstant contained DIRECTORY_SEPARATOR PATH_SEPARATOR
1388 syn keyword phpFunctions contained chdir chroot dir closedir getcwd opendir readdir rewinddir scandir
1389 syn keyword phpClasses contained Directory
1390
1391 " DOM functions
1392 syn keyword phpClasses contained DOMAttr DOMCharacterData DOMComment DOMDocument DOMDocumentFragment DOMDocumentType DOMElement DOMEntity DOMEntityReference DOMException DOMImplementation DOMNamedNodeMap DOMNode DOMNodeList DOMNotation DOMProcessingInstruction DOMText DOMXPath
1393 syn keyword phpCoreConstant contained XML_ELEMENT_NODE XML_ATTRIBUTE_NODE XML_TEXT_NODE XML_CDATA_SECTION_NODE XML_ENTITY_REF_NODE XML_ENTITY_NODE XML_PI_NODE XML_COMMENT_NODE XML_DOCUMENT_NODE XML_DOCUMENT_TYPE_NODE XML_DOCUMENT_FRAG_NODE XML_NOTATION_NODE XML_HTML_DOCUMENT_NODE XML_DTD_NODE XML_ELEMENT_DECL_NODE XML_ATTRIBUTE_DECL_NODE XML_ENTITY_DECL_NODE XML_NAMESPACE_DECL_NODE XML_ATTRIBUTE_CDATA XML_ATTRIBUTE_ID XML_ATTRIBUTE_IDREF XML_ATTRIBUTE_IDREFS XML_ATTRIBUTE_ENTITY XML_ATTRIBUTE_NMTOKEN XML_ATTRIBUTE_NMTOKENS XML_ATTRIBUTE_ENUMERATION XML_ATTRIBUTE_NOTATION DOM_INDEX_SIZE_ERR DOMSTRING_SIZE_ERR DOM_HIERARCHY_REQUEST_ERR DOM_WRONG_DOCUMENT_ERR DOM_INVALID_CHARACTER_ERR DOM_NO_DATA_ALLOWED_ERR DOM_NO_MODIFICATION_ALLOWED_ERR DOM_NOT_FOUND_ERR DOM_NOT_SUPPORTED_ERR DOM_INUSE_ATTRIBUTE_ERR DOM_INVALID_STATE_ERR DOM_SYNTAX_ERR DOM_INVALID_MODIFICATION_ERR DOM_NAMESPACE_ERR DOM_INVALID_ACCESS_ERR DOM_VALIDATION_ERR
1394 syn keyword phpFunctions contained dom_import_simplexml
1395
1396 " DOM XML functions
1397 " NOTE: DOM XML is deprecated in favour of the new 'DOM' extension (they
1398 " appear to contain overlapping functionality)
1399 " syn keyword phpCoreConstant contained XML_ELEMENT_NODE XML_ATTRIBUTE_NODE XML_TEXT_NODE XML_CDATA_SECTION_NODE XML_ENTITY_REF_NODE XML_ENTITY_NODE XML_PI_NODE XML_COMMENT_NODE XML_DOCUMENT_NODE XML_DOCUMENT_TYPE_NODE XML_DOCUMENT_FRAG_NODE XML_NOTATION_NODE XML_GLOBAL_NAMESPACE XML_LOCAL_NAMESPACE XML_HTML_DOCUMENT_NODE XML_DTD_NODE XML_ELEMENT_DECL_NODE XML_ATTRIBUTE_DECL_NODE XML_ENTITY_DECL_NODE XML_NAMESPACE_DECL_NODE XML_ATTRIBUTE_CDATA XML_ATTRIBUTE_ID XML_ATTRIBUTE_IDREF XML_ATTRIBUTE_IDREFS XML_ATTRIBUTE_ENTITY XML_ATTRIBUTE_NMTOKEN XML_ATTRIBUTE_NMTOKENS XML_ATTRIBUTE_ENUMERATION XML_ATTRIBUTE_NOTATION XPATH_UNDEFINED XPATH_NODESET XPATH_BOOLEAN XPATH_NUMBER XPATH_STRING XPATH_POINT XPATH_RANGE XPATH_LOCATIONSET XPATH_USERS XPATH_NUMBER
1400 " syn keyword phpClasses contained DomAttribute DomCData DomComment DomDocument DomDocumentType DomElement DomEntity DomEntityReference DomProcessingInstruction DomText Parser XPathContext
1401 " syn keyword phpFunctions contained domxml_new_doc domxml_open_file domxml_open_mem domxml_version domxml_xmltree domxml_xslt_stylesheet_doc domxml_xslt_stylesheet_file domxml_xslt_stylesheet domxml_xslt_version xpath_eval_expression xpath_eval xpath_new_context xpath_register_ns_auto xpath_register_ns xptr_eval xptr_new_context
1402
1403 " Enchant functions
1404 syn keyword phpFunctions contained enchant_broker_describe enchant_broker_dict_exists enchant_broker_free_dict enchant_broker_free enchant_broker_get_error enchant_broker_init enchant_broker_list_dicts enchant_broker_request_dict enchant_broker_request_pwl_dict enchant_broker_set_ordering enchant_dict_add_to_personal enchant_dict_add_to_session enchant_dict_check enchant_dict_describe enchant_dict_get_error enchant_dict_is_in_session enchant_dict_quick_check enchant_dict_store_replacement enchant_dict_suggest
1405
1406 " error-handling
1407 syn keyword phpCoreConstant contained E_ERROR E_WARNING E_PARSE E_NOTICE E_CORE_ERROR E_CORE_WARNING E_COMPILE_ERROR E_COMPILE_WARNING E_USER_ERROR E_USER_WARNING E_USER_NOTICE E_STRICT E_RECOVERABLE_ERROR E_ALL
1408 syn keyword phpFunctions contained debug_backtrace debug_print_backtrace error_get_last error_log error_reporting restore_error_handler restore_exception_handler set_error_handler set_exception_handler trigger_error user_error
1409
1410 " exif functions
1411 syn keyword phpCoreConstant contained EXIF_USE_MBSTRING
1412 syn keyword phpCoreConstant contained IMAGETYPE_GIF IMAGETYPE_JPEG IMAGETYPE_PNG IMAGETYPE_SWF IMAGETYPE_PSD IMAGETYPE_BMP IMAGETYPE_TIFF_II IMAGETYPE_TIFF_MM IMAGETYPE_JPC IMAGETYPE_JP2 IMAGETYPE_JPX IMAGETYPE_JB2 IMAGETYPE_SWC IMAGETYPE_IFF IMAGETYPE_WBMP IMAGETYPE_XBM
1413 syn keyword phpFunctions contained exif_imagetype exif_read_data exif_tagname exif_thumbnail read_exif_data
1414
1415 " expect functions
1416 syn keyword phpCoreConstant contained EXP_GLOB EXP_EXACT EXP_REGEXP EXP_EOF EXP_TIMEOUT EXP_FULLBUFFER
1417 syn keyword phpFunctions contained expect_expectl expect_popen
1418
1419 " FAM functions
1420 syn keyword phpCoreConstant contained FAMChanged FAMDeleted FAMStartExecuting FAMStopExecuting FAMCreated FAMMoved FAMAcknowledge FAMExists FAMEndExist
1421 syn keyword phpFunctions contained fam_cancel_monitor fam_close fam_monitor_collection fam_monitor_directory fam_monitor_file fam_next_event fam_open fam_pending fam_resume_monitor fam_suspend_monitor
1422
1423 " FDF functions
1424 syn keyword phpCoreConstant contained FDFValue FDFStatus FDFFile FDFID FDFFf FDFSetFf FDFClearFf FDFFlags FDFSetF FDFClrF FDFAP FDFAS FDFAction FDFAA FDFAPRef FDFIF FDFEnter FDFExit FDFDown FDFUp FDFFormat FDFValidate FDFKeystroke FDFCalculate FDFNormalAP FDFRolloverAP FDFDownAP
1425 syn keyword phpFunctions contained fdf_add_doc_javascript fdf_add_template fdf_close fdf_create fdf_enum_values fdf_errno fdf_error fdf_get_ap fdf_get_attachment fdf_get_encoding fdf_get_file fdf_get_flags fdf_get_opt fdf_get_status fdf_get_value fdf_get_version fdf_header fdf_next_field_name fdf_open_string fdf_open fdf_remove_item fdf_save_string fdf_save fdf_set_ap fdf_set_encoding fdf_set_file fdf_set_flags fdf_set_javascript_action fdf_set_on_import_javascript fdf_set_opt fdf_set_status fdf_set_submit_form_action fdf_set_target_frame fdf_set_value fdf_set_version
1426
1427 " Fileinfo functions
1428 syn keyword phpCoreConstant contained FILEINFO_NONE FILEINFO_SYMLINK FILEINFO_MIME FILEINFO_COMPRESS FILEINFO_DEVICES FILEINFO_CONTINUE FILEINFO_PRESERVE_ATIME FILEINFO_RAW
1429 syn keyword phpFunctions contained finfo_buffer finfo_close finfo_file finfo_open finfo_set_flags
1430
1431 " Filepro functions
1432 syn keyword phpFunctions contained filepro_fieldcount filepro_fieldname filepro_fieldtype filepro_fieldwidth filepro_retrieve filepro_rowcount filepro
1433
1434 " Filesystem functions
1435 syn keyword phpCoreConstant contained GLOB_BRACE GLOB_ONLYDIR GLOB_MARK GLOB_NOSORT GLOB_NOCHECK GLOB_NOESCAPE PATHINFO_DIRNAME PATHINFO_BASENAME PATHINFO_EXTENSION PATHINFO_FILENAME FILE_USE_INCLUDE_PATH FILE_APPEND FILE_IGNORE_NEW_LINES FILE_SKIP_EMPTY_LINES FILE_BINARY FILE_TEXT
1436 syn keyword phpFunctions contained basename chgrp chmod chown clearstatcache copy delete dirname disk_free_space disk_total_space diskfreespace fclose feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents file fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype flock fnmatch fopen fpassthru fputcsv fputs fread fscanf fseek fstat ftell ftruncate fwrite glob is_dir is_executable is_file is_link is_readable is_uploaded_file is_writable is_writeable lchgrp lchown link linkinfo lstat mkdir move_uploaded_file parse_ini_file pathinfo pclose popen readfile readlink realpath rename rewind rmdir set_file_buffer stat symlink tempnam tmpfile touch umask unlink
1437
1438 " Filter extension
1439 syn keyword phpCoreConstant contained INPUT_POST INPUT_GET INPUT_COOKIE INPUT_ENV INPUT_SERVER INPUT_SESSION INPUT_REQUEST FILTER_FLAG_NONE FILTER_REQUIRE_SCALAR FILTER_REQUIRE_ARRAY FILTER_FORCE_ARRAY FILTER_NULL_ON_FAILURE FILTER_VALIDATE_INT FILTER_VALIDATE_BOOLEAN FILTER_VALIDATE_FLOAT FILTER_VALIDATE_REGEXP FILTER_VALIDATE_URL FILTER_VALIDATE_EMAIL FILTER_VALIDATE_IP FILTER_DEFAULT FILTER_UNSAFE_RAW FILTER_SANITIZE_STRING FILTER_SANITIZE_STRIPPED FILTER_SANITIZE_ENCODED FILTER_SANITIZE_SPECIAL_CHARS FILTER_SANITIZE_EMAIL FILTER_SANITIZE_URL FILTER_SANITIZE_NUMBER_INT FILTER_SANITIZE_NUMBER_FLOAT FILTER_SANITIZE_MAGIC_QUOTES FILTER_CALLBACK FILTER_FLAG_ALLOW_OCTAL FILTER_FLAG_ALLOW_HEX FILTER_FLAG_STRIP_LOW FILTER_FLAG_STRIP_HIGH FILTER_FLAG_ENCODE_LOW FILTER_FLAG_ENCODE_HIGH FILTER_FLAG_ENCODE_AMP FILTER_FLAG_NO_ENCODE_QUOTES FILTER_FLAG_EMPTY_STRING_NULL FILTER_FLAG_ALLOW_FRACTION FILTER_FLAG_ALLOW_THOUSAND FILTER_FLAG_ALLOW_SCIENTIFIC FILTER_FLAG_SCHEME_REQUIRED FILTER_FLAG_HOST_REQUIRED FILTER_FLAG_PATH_REQUIRED FILTER_FLAG_QUERY_REQUIRED FILTER_FLAG_IPV4 FILTER_FLAG_IPV6 FILTER_FLAG_NO_RES_RANGE FILTER_FLAG_NO_PRIV_RANGE
1440 syn keyword phpFunctions contained filter_has_var filter_id filter_input_array filter_input filter_list filter_var_array filter_var
1441
1442 " Firebird / interbase functions
1443 syn keyword phpCoreConstant contained IBASE_DEFAULT IBASE_READ IBASE_WRITE IBASE_CONSISTENCY IBASE_CONCURRENCY IBASE_COMMITTED IBASE_WAIT IBASE_NOWAIT IBASE_FETCH_BLOBS IBASE_FETCH_ARRAYS IBASE_UNIXTIME IBASE_BKP_IGNORE_CHECKSUMS IBASE_BKP_IGNORE_LIMBO IBASE_BKP_METADATA_ONLY IBASE_BKP_NO_GARBAGE_COLLECT IBASE_BKP_OLD_DESCRIPTIONS IBASE_BKP_NON_TRANSPORTABLE IBASE_BKP_CONVERT IBASE_RES_DEACTIVATE_IDX IBASE_RES_NO_SHADOW IBASE_RES_NO_VALIDITY IBASE_RES_ONE_AT_A_TIME IBASE_RES_REPLACE IBASE_RES_CREATE IBASE_RES_USE_ALL_SPACE IBASE_PRP_PAGE_BUFFERS IBASE_PRP_SWEEP_INTERVAL IBASE_PRP_SHUTDOWN_DB IBASE_PRP_DENY_NEW_TRANSACTIONS IBASE_PRP_DENY_NEW_ATTACHMENTS IBASE_PRP_RESERVE_SPACE IBASE_PRP_RES_USE_FULL IBASE_PRP_RES IBASE_PRP_WRITE_MODE IBASE_PRP_WM_ASYNC IBASE_PRP_WM_SYNC IBASE_PRP_ACCESS_MODE IBASE_PRP_AM_READONLY IBASE_PRP_AM_READWRITE IBASE_PRP_SET_SQL_DIALECT IBASE_PRP_ACTIVATE IBASE_PRP_DB_ONLINE IBASE_RPR_CHECK_DB IBASE_RPR_IGNORE_CHECKSUM IBASE_RPR_KILL_SHADOWS IBASE_RPR_MEND_DB IBASE_RPR_VALIDATE_DB IBASE_RPR_FULL IBASE_RPR_SWEEP_DB IBASE_STS_DATA_PAGES IBASE_STS_DB_LOG IBASE_STS_HDR_PAGES IBASE_STS_IDX_PAGES IBASE_STS_SYS_RELATIONS IBASE_SVC_SERVER_VERSION IBASE_SVC_IMPLEMENTATION IBASE_SVC_GET_ENV IBASE_SVC_GET_ENV_LOCK IBASE_SVC_GET_ENV_MSG IBASE_SVC_USER_DBPATH IBASE_SVC_SVR_DB_INFO IBASE_SVC_GET_USERS
1444 syn keyword phpFunctions contained ibase_add_user ibase_affected_rows ibase_backup ibase_blob_add ibase_blob_cancel ibase_blob_close ibase_blob_create ibase_blob_echo ibase_blob_get ibase_blob_import ibase_blob_info ibase_blob_open ibase_close ibase_commit_ret ibase_commit ibase_connect ibase_db_info ibase_delete_user ibase_drop_db ibase_errcode ibase_errmsg ibase_execute ibase_fetch_assoc ibase_fetch_object ibase_fetch_row ibase_field_info ibase_free_event_handler ibase_free_query ibase_free_result ibase_gen_id ibase_maintain_db ibase_modify_user ibase_name_result ibase_num_fields ibase_num_params ibase_param_info ibase_pconnect ibase_prepare ibase_query ibase_restore ibase_rollback_ret ibase_rollback ibase_server_info ibase_service_attach ibase_service_detach ibase_set_event_handler ibase_timefmt ibase_trans ibase_wait_event
1445
1446 " FriDiBi functions
1447 syn keyword phpCoreConstant contained FRIBIDI_CHARSET_UTF8 FRIBIDI_CHARSET_8859_6 FRIBIDI_CHARSET_8859_8 FRIBIDI_CHARSET_CP1255 FRIBIDI_CHARSET_CP1256 FRIBIDI_CHARSET_ISIRI_3342 FRIBIDI_CHARSET_CAP_RTL FRIBIDI_RTL FRIBIDI_LTR FRIBIDI_AUTO
1448 syn keyword phpFunctions contained fribidi_log2vis
1449
1450 " FrontBase functions
1451 syn keyword phpCoreConstant contained FBSQL_ASSOC FBSQL_NUM FBSQL_BOTH FBSQL_LOCK_DEFERRED FBSQL_LOCK_OPTIMISTIC FBSQL_LOCK_PESSIMISTIC FBSQL_ISO_READ_UNCOMMITTED FBSQL_ISO_READ_COMMITTED FBSQL_ISO_REPEATABLE_READ FBSQL_ISO_SERIALIZABLE FBSQL_ISO_VERSIONED FBSQL_UNKNOWN FBSQL_STOPPED FBSQL_STARTING FBSQL_RUNNING FBSQL_STOPPING FBSQL_NOEXEC FBSQL_LOB_DIRECT FBSQL_LOB_HANDLE
1452 syn keyword phpFunctions contained fbsql_affected_rows fbsql_autocommit fbsql_blob_size fbsql_change_user fbsql_clob_size fbsql_close fbsql_commit fbsql_connect fbsql_create_blob fbsql_create_clob fbsql_create_db fbsql_data_seek fbsql_database_password fbsql_database fbsql_db_query fbsql_db_status fbsql_drop_db fbsql_errno fbsql_error fbsql_fetch_array fbsql_fetch_assoc fbsql_fetch_field fbsql_fetch_lengths fbsql_fetch_object fbsql_fetch_row fbsql_field_flags fbsql_field_len fbsql_field_name fbsql_field_seek fbsql_field_table fbsql_field_type fbsql_free_result fbsql_get_autostart_info fbsql_hostname fbsql_insert_id fbsql_list_dbs fbsql_list_fields fbsql_list_tables fbsql_next_result fbsql_num_fields fbsql_num_rows fbsql_password fbsql_pconnect fbsql_query fbsql_read_blob fbsql_read_clob fbsql_result fbsql_rollback fbsql_rows_fetched fbsql_select_db fbsql_set_characterset fbsql_set_lob_mode fbsql_set_password fbsql_set_transaction fbsql_start_db fbsql_stop_db fbsql_table_name fbsql_tablename fbsql_username fbsql_warnings
1453
1454 " FTP functions
1455 syn keyword phpCoreConstant contained FTP_ASCII FTP_TEXT FTP_BINARY FTP_IMAGE FTP_TIMEOUT_SEC FTP_AUTOSEEK FTP_AUTORESUME FTP_FAILED FTP_FINISHED FTP_MOREDATA
1456 syn keyword phpFunctions contained ftp_alloc ftp_cdup ftp_chdir ftp_chmod ftp_close ftp_connect ftp_delete ftp_exec ftp_fget ftp_fput ftp_get_option ftp_get ftp_login ftp_mdtm ftp_mkdir ftp_nb_continue ftp_nb_fget ftp_nb_fput ftp_nb_get ftp_nb_put ftp_nlist ftp_pasv ftp_put ftp_pwd ftp_quit ftp_raw ftp_rawlist ftp_rename ftp_rmdir ftp_set_option ftp_site ftp_size ftp_ssl_connect ftp_systype
1457
1458 " Function Handling Functions
1459 syn keyword phpFunctions contained call_user_func_array call_user_func create_function func_get_arg func_get_args func_num_args function_exists get_defined_functions register_shutdown_function register_tick_function unregister_tick_function
1460
1461 " GeoIP Functions
1462 syn keyword phpCoreConstant contained GEOIP_COUNTRY_EDITION GEOIP_REGION_EDITION_REV0 GEOIP_CITY_EDITION_REV0 GEOIP_ORG_EDITION GEOIP_ISP_EDITION GEOIP_CITY_EDITION_REV1 GEOIP_REGION_EDITION_REV1 GEOIP_PROXY_EDITION GEOIP_ASNUM_EDITION GEOIP_NETSPEED_EDITION GEOIP_DOMAIN_EDITION GEOIP_UNKNOWN_SPEED GEOIP_DIALUP_SPEED GEOIP_CABLEDSL_SPEED GEOIP_CORPORATE_SPEED
1463 syn keyword phpFunctions contained geoip_country_code_by_name geoip_country_code3_by_name geoip_country_name_by_name geoip_database_info geoip_db_avail geoip_db_filename geoip_db_get_all_info geoip_id_by_name geoip_org_by_name geoip_record_by_name geoip_region_by_name
1464
1465 " Gettext functions
1466 syn keyword phpFunctions contained bind_textdomain_codeset bindtextdomain dcgettext dcngettext dgettext dngettext gettext ngettext textdomain
1467
1468 " GMP Function
1469 syn keyword phpCoreConstant contained GMP_ROUND_ZERO GMP_ROUND_PLUSINF GMP_ROUND_MINUSINF GMP_VERSION
1470 syn keyword phpFunctions contained gmp_abs gmp_add gmp_and gmp_clrbit gmp_cmp gmp_com gmp_div_q gmp_div_qr gmp_div_r gmp_div gmp_divexact gmp_fact gmp_gcd gmp_gcdext gmp_hamdist gmp_init gmp_intval gmp_invert gmp_jacobi gmp_legendre gmp_mod gmp_mul gmp_neg gmp_nextprime gmp_or gmp_perfect_square gmp_popcount gmp_pow gmp_powm gmp_prob_prime gmp_random gmp_scan0 gmp_scan1 gmp_setbit gmp_sign gmp_sqrt gmp_sqrtrem gmp_strval gmp_sub gmp_testbit gmp_xor
1471
1472 " gnupg Functions
1473 syn keyword phpCoreConstant contained GNUPG_SIG_MODE_NORMAL GNUPG_SIG_MODE_DETACH GNUPG_SIG_MODE_CLEAR GNUPG_VALIDITY_UNKNOWN GNUPG_VALIDITY_UNDEFINED GNUPG_VALIDITY_NEVER GNUPG_VALIDITY_MARGINAL GNUPG_VALIDITY_FULL GNUPG_VALIDITY_ULTIMATE GNUPG_PROTOCOL_OpenPGP GNUPG_PROTOCOL_CMS GNUPG_SIGSUM_VALID GNUPG_SIGSUM_GREEN GNUPG_SIGSUM_RED GNUPG_SIGSUM_KEY_REVOKED GNUPG_SIGSUM_KEY_EXPIRED GNUPG_SIGSUM_KEY_MISSING GNUPG_SIGSUM_SIG_EXPIRED GNUPG_SIGSUM_CRL_MISSING GNUPG_SIGSUM_CRL_TOO_OLD GNUPG_SIGSUM_BAD_POLICY GNUPG_SIGSUM_SYS_ERROR GNUPG_ERROR_WARNING GNUPG_ERROR_EXCEPTION GNUPG_ERROR_SILENT
1474 syn keyword phpFunctions contained gnupg_adddecryptkey gnupg_addencryptkey gnupg_addsignkey gnupg_cleardecryptkeys gnupg_clearencryptkeys gnupg_clearsignkeys gnupg_decrypt gnupg_decryptverify gnupg_encrypt gnupg_encryptsign gnupg_export gnupg_geterror gnupg_getprotocol gnupg_import gnupg_keyinfo gnupg_setarmor gnupg_seterrormode gnupg_setsignmode gnupg_sign gnupg_verify
1475
1476 " Net_Gopher
1477 syn keyword phpCoreConstant contained GOPHER_DOCUMENT GOPHER_DIRECTORY GOPHER_BINHEX GOPHER_DOSBINARY GOPHER_UUENCODED GOPHER_BINARY GOPHER_INFO GOPHER_HTTP GOPHER_UNKNOWN
1478 syn keyword phpFunctions contained gopher_parsedir
1479
1480 " hash functions
1481 syn keyword phpCoreConstant contained HASH_HMAC
1482 syn keyword phpFunctions contained hash_algos hash_file hash_final hash_hmac_file hash_hmac hash_init hash_update_file hash_update_stream hash_update hash
1483
1484 " HTTP functions
1485 " TODO: I've never seen these classes before ... make sure they work / are available
1486 syn keyword phpCoreConstant contained HTTP_SUPPORT HTTP_SUPPORT_REQUESTS HTTP_SUPPORT_MAGICMIME HTTP_SUPPORT_ENCODINGS HTTP_SUPPORT_SSLREQUESTS HTTP_PARAMS_ALLOW_COMMA HTTP_PARAMS_ALLOW_FAILURE HTTP_PARAMS_RAISE_ERROR HTTP_PARAMS_DEFAULT HTTP_COOKIE_PARSE_RAW HTTP_COOKIE_SECURE HTTP_COOKIE_HTTPONLY HTTP_DEFLATE_LEVEL_DEF HTTP_DEFLATE_LEVEL_MIN HTTP_DEFLATE_LEVEL_MAX HTTP_DEFLATE_TYPE_ZLIB HTTP_DEFLATE_TYPE_GZIP HTTP_DEFLATE_TYPE_RAW HTTP_DEFLATE_STRATEGY_DEF HTTP_DEFLATE_STRATEGY_FILT HTTP_DEFLATE_STRATEGY_HUFF HTTP_DEFLATE_STRATEGY_RLE HTTP_DEFLATE_STRATEGY_FIXED HTTP_ENCODING_STREAM_FLUSH_NONE HTTP_ENCODING_STREAM_FLUSH_SYNC HTTP_ENCODING_STREAM_FLUSH_FULL HTTP_E_RUNTIME HTTP_E_INVALID_PARAM HTTP_E_HEADER HTTP_E_MALFORMED_HEADERS HTTP_E_REQUEST_METHOD HTTP_E_MESSAGE_TYPE HTTP_E_ENCODING HTTP_E_REQUEST HTTP_E_REQUEST_POOL HTTP_E_SOCKET HTTP_E_RESPONSE HTTP_E_URL HTTP_E_QUERYSTRING HTTP_MSG_NONE HTTP_MSG_REQUEST HTTP_MSG_RESPONSE HTTP_QUERYSTRING_TYPE_BOOL HTTP_QUERYSTRING_TYPE_INT HTTP_QUERYSTRING_TYPE_FLOAT HTTP_QUERYSTRING_TYPE_STRING
1487 syn keyword phpCoreConstant contained HTTP_QUERYSTRING_TYPE_ARRAY HTTP_QUERYSTRING_TYPE_OBJECT HTTP_AUTH_BASIC HTTP_AUTH_DIGEST HTTP_AUTH_NTLM HTTP_AUTH_GSSNEG HTTP_AUTH_ANY HTTP_VERSION_ANY HTTP_VERSION_1_0 HTTP_VERSION_1_1 HTTP_SSL_VERSION_ANY HTTP_SSL_VERSION_TLSv1 HTTP_SSL_VERSION_SSLv3 HTTP_SSL_VERSION_SSLv2 HTTP_PROXY_SOCKS4 HTTP_PROXY_SOCKS5 HTTP_PROXY_HTTP HTTP_IPRESOLVE_V4 HTTP_IPRESOLVE_V6 HTTP_IPRESOLVE_ANY HTTP_METH_GET HTTP_METH_HEAD HTTP_METH_POST HTTP_METH_PUT HTTP_METH_DELETE HTTP_METH_OPTIONS HTTP_METH_TRACE HTTP_METH_CONNECT HTTP_METH_PROPFIND HTTP_METH_PROPPATCH HTTP_METH_MKCOL HTTP_METH_COPY HTTP_METH_MOVE HTTP_METH_LOCK HTTP_METH_UNLOCK HTTP_METH_VERSION_CONTROL HTTP_METH_REPORT HTTP_METH_CHECKOUT HTTP_METH_CHECKIN HTTP_METH_UNCHECKOUT HTTP_METH_MKWORKSPACE HTTP_METH_UPDATE HTTP_METH_LABEL HTTP_METH_MERGE HTTP_METH_BASELINE_CONTROL HTTP_METH_MKACTIVITY HTTP_METH_ACL HTTP_REDIRECT HTTP_REDIRECT_PERM HTTP_REDIRECT_FOUND HTTP_REDIRECT_POST HTTP_REDIRECT_PROXY HTTP_REDIRECT_TEMP HTTP_URL_REPLACE HTTP_URL_JOIN_PATH
1488 syn keyword phpCoreConstant contained HTTP_URL_JOIN_QUERY HTTP_URL_STRIP_USER HTTP_URL_STRIP_PASS HTTP_URL_STRIP_AUTH HTTP_URL_STRIP_PORT HTTP_URL_STRIP_PATH HTTP_URL_STRIP_QUERY HTTP_URL_STRIP_FRAGMENT HTTP_URL_STRIP_ALL
1489 syn keyword phpClasses contained HttpMessage HttpQueryString HttpDeflateStream HttpInflateStream HttpRequest HttpRequestPool HttpResponse
1490 syn keyword phpFunctions contained http_cache_etag http_cache_last_modified http_chunked_decode http_deflate http_inflate http_get_request_body_stream http_get_request_body http_get_request_headers http_date http_support http_match_etag http_match_modified http_match_request_header http_build_cookie http_negotiate_charset http_negotiate_content_type http_negotiate_language ob_deflatehandler ob_etaghandler ob_inflatehandler http_parse_cookie http_parse_headers http_parse_message http_parse_params http_persistent_handles_count http_persistent_handles_ident http_persistent_handles_clean http_get http_head http_post_data http_post_fields http_put_data http_put_file http_put_stream http_request_method_exists http_request_method_name http_request_method_register http_request_method_unregister http_request http_request_body_encode http_redirect http_send_content_disposition http_send_content_type http_send_data http_send_file http_send_last_modified http_send_status http_send_stream http_throttle http_build_str http_build_url
1491
1492 " Hyperwave functions
1493 syn keyword phpCoreConstant contained HW_ATTR_LANG HW_ATTR_NR HW_ATTR_NONE
1494 syn keyword phpFunctions contained hw_Array2Objrec hw_changeobject hw_Children hw_ChildrenObj hw_Close hw_Connect hw_connection_info hw_cp hw_Deleteobject hw_DocByAnchor hw_DocByAnchorObj hw_Document_Attributes hw_Document_BodyTag hw_Document_Content hw_Document_SetContent hw_Document_Size hw_dummy hw_EditText hw_Error hw_ErrorMsg hw_Free_Document hw_GetAnchors hw_GetAnchorsObj hw_GetAndLock hw_GetChildColl hw_GetChildCollObj hw_GetChildDocColl hw_GetChildDocCollObj hw_GetObject hw_GetObjectByQuery hw_GetObjectByQueryColl hw_GetObjectByQueryCollObj hw_GetObjectByQueryObj hw_GetParents hw_GetParentsObj hw_getrellink hw_GetRemote hw_getremotechildren hw_GetSrcByDestObj hw_GetText hw_getusername hw_Identify hw_InCollections hw_Info hw_InsColl hw_InsDoc hw_insertanchors hw_InsertDocument hw_InsertObject hw_mapid hw_Modifyobject hw_mv hw_New_Document hw_objrec2array hw_Output_Document hw_pConnect hw_PipeDocument hw_Root hw_setlinkroot hw_stat hw_Unlock hw_Who
1495
1496 " Hyperwave API
1497 syn keyword phpClasses contained HW_API HW_API_Object HW_API_Attribute HW_API_Error HW_API_Content HW_API_Reason
1498 syn keyword phpFunctions contained hw_api_object hw_api_content hwapi_hgcsp hw_api_attribute
21166df1 1499
d99475eb
ER
1500 " NOTE: i18n functions are not yet available
1501
1502 " IBM DB2
1503 syn keyword phpCoreConstant contained DB2_BINARY DB2_CONVERT DB2_PASSTHRU DB2_SCROLLABLE DB2_FORWARD_ONLY DB2_PARAM_IN DB2_PARAM_OUT DB2_PARAM_INOUT DB2_PARAM_FILE DB2_AUTOCOMMIT_ON DB2_AUTOCOMMIT_OFF DB2_DOUBLE DB2_LONG DB2_CHAR DB2_CASE_NATURAL DB2_CASE_LOWER DB2_CASE_UPPER DB2_DEFERRED_PREPARE_ON DB2_DEFERRED_PREPARE_OFF
1504 syn keyword phpFunctions contained db2_autocommit db2_bind_param db2_client_info db2_close db2_column_privileges db2_columns db2_commit db2_conn_error db2_conn_errormsg db2_connect db2_cursor_type db2_escape_string db2_exec db2_execute db2_fetch_array db2_fetch_assoc db2_fetch_both db2_fetch_object db2_fetch_row db2_field_display_size db2_field_name db2_field_num db2_field_precision db2_field_scale db2_field_type db2_field_width db2_foreign_keys db2_free_result db2_free_stmt db2_get_option db2_lob_read db2_next_result db2_num_fields db2_num_rows db2_pconnect db2_prepare db2_primary_keys db2_procedure_columns db2_procedures db2_result db2_rollback db2_server_info db2_set_option db2_special_columns db2_statistics db2_stmt_error db2_stmt_errormsg db2_table_privileges db2_tables
1505
1506 " ICONV functions
1507 syn keyword phpCoreConstant contained ICONV_IMPL ICONV_VERSION ICONV_MIME_DECODE_STRICT ICONV_MIME_DECODE_CONTINUE_ON_ERROR
1508 syn keyword phpFunctions contained iconv_get_encoding iconv_mime_decode_headers iconv_mime_decode iconv_mime_encode iconv_set_encoding iconv_strlen iconv_strpos iconv_strrpos iconv_substr iconv ob_iconv_handler
1509
1510 " ID3 functions
1511 syn keyword phpCoreConstant contained ID3_V1_0 ID3_V1_1 ID3_V2_1 ID3_V2_2 ID3_V2_3 ID3_V2_4 ID3_BEST
1512 syn keyword phpFunctions contained id3_get_frame_long_name id3_get_frame_short_name id3_get_genre_id id3_get_genre_list id3_get_genre_name id3_get_tag id3_get_version id3_remove_tag id3_set_tag
1513
1514 " IIS functions
1515 syn keyword phpCoreConstant contained IIS_READ IIS_WRITE IIS_EXECUTE IIS_SCRIPT IIS_ANONYMOUS IIS_BASIC IIS_NTLM IIS_STARTING IIS_STOPPED IIS_PAUSED IIS_RUNNING
1516 syn keyword phpFunctions contained iis_add_server iis_get_dir_security iis_get_script_map iis_get_server_by_comment iis_get_server_by_path iis_get_server_rights iis_get_service_state iis_remove_server iis_set_app_settings iis_set_dir_security iis_set_script_map iis_set_server_rights iis_start_server iis_start_service iis_stop_server iis_stop_service
1517
1518 " Image functions
1519 syn keyword phpCoreConstant contained GD_VERSION GD_MAJOR_VERSION GD_MINOR_VERSION GD_RELEASE_VERSION GD_EXTRA_VERSION IMG_GIF IMG_JPG IMG_JPEG IMG_PNG IMG_WBMP IMG_XPM IMG_COLOR_TILED IMG_COLOR_STYLED IMG_COLOR_BRUSHED IMG_COLOR_STYLEDBRUSHED IMG_COLOR_TRANSPARENT IMG_ARC_ROUNDED IMG_ARC_PIE IMG_ARC_CHORD IMG_ARC_NOFILL IMG_ARC_EDGED IMG_GD2_RAW IMG_GD2_COMPRESSED IMG_EFFECT_REPLACE IMG_EFFECT_ALPHABLEND IMG_EFFECT_NORMAL IMG_EFFECT_OVERLAY IMG_FILTER_NEGATE IMG_FILTER_GRAYSCALE IMG_FILTER_BRIGHTNESS IMG_FILTER_CONTRAST IMG_FILTER_COLORIZE IMG_FILTER_EDGEDETECT IMG_FILTER_GAUSSIAN_BLUR IMG_FILTER_SELECTIVE_BLUR IMG_FILTER_EMBOSS IMG_FILTER_MEAN_REMOVAL IMG_FILTER_SMOOTH IMAGETYPE_GIF IMAGETYPE_JPEG IMAGETYPE_PNG IMAGETYPE_SWF IMAGETYPE_PSD IMAGETYPE_BMP IMAGETYPE_WBMP IMAGETYPE_XBM IMAGETYPE_TIFF_II IMAGETYPE_TIFF_MM IMAGETYPE_IFF IMAGETYPE_JB2 IMAGETYPE_JPC IMAGETYPE_JP2 IMAGETYPE_JPX IMAGETYPE_SWC IMAGETYPE_ICO PNG_NO_FILTER PNG_FILTER_NONE PNG_FILTER_SUB PNG_FILTER_UP PNG_FILTER_AVG PNG_FILTER_PAETH PNG_ALL_FILTERS
1520 syn keyword phpFunctions contained gd_info getimagesize image_type_to_extension image_type_to_mime_type image2wbmp imagealphablending imageantialias imagearc imagechar imagecharup imagecolorallocate imagecolorallocatealpha imagecolorat imagecolorclosest imagecolorclosestalpha imagecolorclosesthwb imagecolordeallocate imagecolorexact imagecolorexactalpha imagecolormatch imagecolorresolve imagecolorresolvealpha imagecolorset imagecolorsforindex imagecolorstotal imagecolortransparent imageconvolution imagecopy imagecopymerge imagecopymergegray imagecopyresampled imagecopyresized imagecreate imagecreatefromgd2 imagecreatefromgd2part imagecreatefromgd imagecreatefromgif imagecreatefromjpeg imagecreatefrompng imagecreatefromstring imagecreatefromwbmp imagecreatefromxbm imagecreatefromxpm imagecreatetruecolor imagedashedline imagedestroy imageellipse imagefill imagefilledarc imagefilledellipse imagefilledpolygon imagefilledrectangle imagefilltoborder imagefilter imagefontheight
1521 syn keyword phpFunctions contained imagefontwidth imageftbbox imagefttext imagegammacorrect imagegd2 imagegd imagegif imagegrabscreen imagegrabwindow imageinterlace imageistruecolor imagejpeg imagelayereffect imageline imageloadfont imagepalettecopy imagepng imagepolygon imagepsbbox imagepsencodefont imagepsextendfont imagepsfreefont imagepsloadfont imagepsslantfont imagepstext imagerectangle imagerotate imagesavealpha imagesetbrush imagesetpixel imagesetstyle imagesetthickness imagesettile imagestring imagestringup imagesx imagesy imagetruecolortopalette imagettfbbox imagettftext imagetypes imagewbmp imagexbm iptcembed iptcparse jpeg2wbmp png2wbmp
1522
1523 " Imagick Image Library
1524 " NOTE: this extension is experimental
1525 " syn keyword phpClasses contained Imagick ImagickDraw ImagickPixel ImagickPixelIterator
1526
1527 " IMAP POP3 and NNTP functions
1528 syn keyword phpCoreConstant contained NIL OP_DEBUG OP_READONLY OP_ANONYMOUS OP_SHORTCACHE OP_SILENT OP_PROTOTYPE OP_HALFOPEN OP_EXPUNGE OP_SECURE CL_EXPUNGE FT_UID FT_PEEK FT_NOT FT_INTERNAL FT_PREFETCHTEXT ST_UID ST_SILENT ST_SET CP_UID CP_MOVE SE_UID SE_FREE SE_NOPREFETCH SO_FREE SO_NOSERVER SA_MESSAGES SA_RECENT SA_UNSEEN SA_UIDNEXT SA_UIDVALIDITY SA_ALL LATT_NOINFERIORS LATT_NOSELECT LATT_MARKED LATT_UNMARKED SORTDATE SORTARRIVAL SORTFROM SORTSUBJECT SORTTO SORTCC SORTSIZE TYPETEXT TYPEMULTIPART TYPEMESSAGE TYPEAPPLICATION TYPEAUDIO TYPEIMAGE TYPEVIDEO TYPEOTHER ENC7BIT ENC8BIT ENCBINARY ENCBASE64 ENCQUOTEDPRINTABLE ENCOTHER IMAP_OPENTIMEOUT IMAP_READTIMEOUT IMAP_WRITETIMEOUT IMAP_CLOSETIMEOUT LATT_REFERRAL LATT_HASCHILDREN LATT_HASNOCHILDREN TYPEMODEL
1529 syn keyword phpFunctions contained imap_8bit imap_alerts imap_append imap_base64 imap_binary imap_body imap_bodystruct imap_check imap_clearflag_full imap_close imap_createmailbox imap_delete imap_deletemailbox imap_errors imap_expunge imap_fetch_overview imap_fetchbody imap_fetchheader imap_fetchstructure imap_get_quota imap_get_quotaroot imap_getacl imap_getmailboxes imap_getsubscribed imap_header imap_headerinfo imap_headers imap_last_error imap_list imap_listmailbox imap_listscan imap_listsubscribed imap_lsub imap_mail_compose imap_mail_copy imap_mail_move imap_mail imap_mailboxmsginfo imap_mime_header_decode imap_msgno imap_num_msg imap_num_recent imap_open imap_ping imap_qprint imap_renamemailbox imap_reopen imap_rfc822_parse_adrlist imap_rfc822_parse_headers imap_rfc822_write_address imap_savebody imap_scanmailbox imap_search imap_set_quota imap_setacl imap_setflag_full imap_sort imap_status imap_subscribe imap_thread imap_timeout imap_uid imap_undelete imap_unsubscribe imap_utf7_decode imap_utf7_encode imap_utf8
1530
1531 " Informix functions
1532 syn keyword phpCoreConstant contained IFX_SCROLL IFX_HOLD IFX_LO_RDONLY IFX_LO_WRONLY IFX_LO_APPEND IFX_LO_RDWR IFX_LO_BUFFER IFX_LO_NOBUFFER
1533 syn keyword phpFunctions contained ifx_affected_rows ifx_blobinfile_mode ifx_byteasvarchar ifx_close ifx_connect ifx_copy_blob ifx_create_blob ifx_create_char ifx_do ifx_error ifx_errormsg ifx_fetch_row ifx_fieldproperties ifx_fieldtypes ifx_free_blob ifx_free_char ifx_free_result ifx_get_blob ifx_get_char ifx_getsqlca ifx_htmltbl_result ifx_nullformat ifx_num_fields ifx_num_rows ifx_pconnect ifx_prepare ifx_query ifx_textasvarchar ifx_update_blob ifx_update_char ifxus_close_slob ifxus_create_slob ifxus_free_slob ifxus_open_slob ifxus_read_slob ifxus_seek_slob ifxus_tell_slob ifxus_write_slob
1534
1535 " Ingres II Functions
1536 syn keyword phpCoreConstant contained INGRES_ASSOC INGRES_NUM INGRES_BOTH INGRES_EXT_VERSION INGRES_API_VERSION INGRES_CURSOR_READONLY INGRES_CURSOR_UPDATE INGRES_DATE_MULTINATIONAL INGRES_DATE_MULTINATIONAL4 INGRES_DATE_FINNISH INGRES_DATE_ISO INGRES_DATE_ISO4 INGRES_DATE_GERMAN INGRES_DATE_MDY INGRES_DATE_DMY INGRES_DATE_YMD INGRES_MONEY_LEADING INGRES_MONEY_TRAILING INGRES_STRUCTURE_BTREE INGRES_STRUCTURE_CBTREE INGRES_STRUCTURE_HASH INGRES_STRUCTURE_CHASH INGRES_STRUCTURE_HEAP INGRES_STRUCTURE_CHEAP INGRES_STRUCTURE_ISAM INGRES_STRUCTURE_CISAM
1537 syn keyword phpFunctions contained ingres_autocommit ingres_close ingres_commit ingres_connect ingres_cursor ingres_errno ingres_error ingres_errsqlstate ingres_fetch_array ingres_fetch_object ingres_fetch_row ingres_field_length ingres_field_name ingres_field_nullable ingres_field_precision ingres_field_scale ingres_field_type ingres_num_fields ingres_num_rows ingres_pconnect ingres_query ingres_rollback
1538
1539 " IRC Gateway functions
1540 syn keyword phpFunctions contained ircg_channel_mode ircg_disconnect ircg_eval_ecmascript_params ircg_fetch_error_msg ircg_get_username ircg_html_encode ircg_ignore_add ircg_ignore_del ircg_invite ircg_is_conn_alive ircg_join ircg_kick ircg_list ircg_lookup_format_messages ircg_lusers ircg_msg ircg_names ircg_nick ircg_nickname_escape ircg_nickname_unescape ircg_notice ircg_oper ircg_part ircg_pconnect ircg_register_format_messages ircg_set_current ircg_set_file ircg_set_on_die ircg_topic ircg_who ircg_whois
1541
1542 " PHP/Java Integration
1543 " NOTE: this extension is experimental
1544
1545 " JSON functions
1546 syn keyword phpFunctions contained json_decode json_encode
1547
1548 " KADM5
1549 syn keyword phpCoreConstant contained KRB5_KDB_DISALLOW_POSTDATED KRB5_KDB_DISALLOW_FORWARDABLE KRB5_KDB_DISALLOW_TGT_BASED KRB5_KDB_DISALLOW_RENEWABLE KRB5_KDB_DISALLOW_PROXIABLE KRB5_KDB_DISALLOW_DUP_SKEY KRB5_KDB_DISALLOW_ALL_TIX KRB5_KDB_REQUIRES_PRE_AUTH KRB5_KDB_REQUIRES_HW_AUTH KRB5_KDB_REQUIRES_PWCHANGE KRB5_KDB_DISALLOW_SVR KRB5_KDB_PWCHANGE_SERVER KRB5_KDB_SUPPORT_DESMD5 KRB5_KDB_NEW_PRINC KADM5_PRINCIPAL KADM5_PRINC_EXPIRE_TIME KADM5_LAST_PW_CHANGE KADM5_PW_EXPIRATION KADM5_MAX_LIFE KADM5_MAX_RLIFE KADM5_MOD_NAME KADM5_MOD_TIME KADM5_KVNO KADM5_POLICY KADM5_CLEARPOLICY KADM5_LAST_SUCCESS KADM5_LAST_FAILED KADM5_FAIL_AUTH_COUNT KADM5_RANDKEY KADM5_ATTRIBUTES
1550 syn keyword phpFunctions contained kadm5_chpass_principal kadm5_create_principal kadm5_delete_principal kadm5_destroy kadm5_flush kadm5_get_policies kadm5_get_principal kadm5_get_principals kadm5_init_with_password kadm5_modify_principal
1551
1552 " LDAP functions
1553 syn keyword phpCoreConstant contained LDAP_DEREF_NEVER LDAP_DEREF_SEARCHING LDAP_DEREF_FINDING LDAP_DEREF_ALWAYS LDAP_OPT_DEREF LDAP_OPT_SIZELIMIT LDAP_OPT_TIMELIMIT LDAP_OPT_NETWORK_TIMEOUT LDAP_OPT_PROTOCOL_VERSION LDAP_OPT_ERROR_NUMBER LDAP_OPT_REFERRALS LDAP_OPT_RESTART LDAP_OPT_HOST_NAME LDAP_OPT_ERROR_STRING LDAP_OPT_MATCHED_DN LDAP_OPT_SERVER_CONTROLS LDAP_OPT_CLIENT_CONTROLS LDAP_OPT_DEBUG_LEVEL GSLC_SSL_NO_AUTH GSLC_SSL_ONEWAY_AUTH GSLC_SSL_TWOWAY_AUTH
1554 syn keyword phpFunctions contained ldap_8859_to_t61 ldap_add ldap_bind ldap_close ldap_compare ldap_connect ldap_count_entries ldap_delete ldap_dn2ufn ldap_err2str ldap_errno ldap_error ldap_explode_dn ldap_first_attribute ldap_first_entry ldap_first_reference ldap_free_result ldap_get_attributes ldap_get_dn ldap_get_entries ldap_get_option ldap_get_values_len ldap_get_values ldap_list ldap_mod_add ldap_mod_del ldap_mod_replace ldap_modify ldap_next_attribute ldap_next_entry ldap_next_reference ldap_parse_reference ldap_parse_result ldap_read ldap_rename ldap_sasl_bind ldap_search ldap_set_option ldap_set_rebind_proc ldap_sort ldap_start_tls ldap_t61_to_8859 ldap_unbind
1555
1556 " libxml functions
1557 syn keyword phpClasses contained LibXMLError
1558 syn keyword phpCoreConstant contained LIBXML_COMPACT LIBXML_DTDATTR LIBXML_DTDLOAD LIBXML_DTDVALID LIBXML_NOBLANKS LIBXML_NOCDATA LIBXML_NOEMPTYTAG LIBXML_NOENT LIBXML_NOERROR LIBXML_NONET LIBXML_NOWARNING LIBXML_NOXMLDECL LIBXML_NSCLEAN LIBXML_XINCLUDE LIBXML_ERR_ERROR LIBXML_ERR_FATAL LIBXML_ERR_NONE LIBXML_ERR_WARNING LIBXML_VERSION LIBXML_DOTTED_VERSION
1559 syn keyword phpFunctions contained libxml_clear_errors libxml_get_errors libxml_get_last_error libxml_set_streams_context libxml_use_internal_errors
1560
1561 " Lotus Notes functions
1562 " NOTE: experimental, no maintainer
1563 " syn keyword phpFunctions contained notes_body notes_copy_db notes_create_db notes_create_note notes_drop_db notes_find_note notes_header_info notes_list_msgs notes_mark_read notes_mark_unread notes_nav_create notes_search notes_unread notes_version
1564
1565 " LZF functions
1566 syn keyword phpFunctions contained lzf_compress lzf_decompress lzf_optimized_for
1567
1568 " Mail functions
1569 syn keyword phpFunctions contained ezmlm_hash mail
1570
1571 " Mailparse functions
1572 syn keyword phpCoreConstant contained MAILPARSE_EXTRACT_OUTPUT MAILPARSE_EXTRACT_STREAM MAILPARSE_EXTRACT_RETURN
1573 syn keyword phpFunctions contained mailparse_determine_best_xfer_encoding mailparse_msg_create mailparse_msg_extract_part_file mailparse_msg_extract_part mailparse_msg_extract_whole_part_file mailparse_msg_free mailparse_msg_get_part_data mailparse_msg_get_part mailparse_msg_get_structure mailparse_msg_parse_file mailparse_msg_parse mailparse_rfc822_parse_addresses mailparse_stream_encode mailparse_uudecode_all
1574
1575 " Mathematical functions
1576 syn keyword phpCoreConstant contained M_PI M_E M_LOG2E M_LOG10E M_LN2 M_LN10 M_PI_2 M_PI_4 M_1_PI M_2_PI M_SQRTPI M_2_SQRTPI M_SQRT2 M_SQRT3 M_SQRT1_2 M_LNPI M_EULER
1577 syn keyword phpFunctions contained abs acos acosh asin asinh atan2 atan atanh base_convert bindec ceil cos cosh decbin dechex decoct deg2rad exp expm1 floor fmod getrandmax hexdec hypot is_finite is_infinite is_nan lcg_value log10 log1p log max min mt_getrandmax mt_rand mt_srand octdec pi pow rad2deg rand round sin sinh sqrt srand tan tanh
1578
1579 " MaxDB functions
1580 syn keyword phpClasses contained maxdb maxdb_stmt maxdb_result
1581 syn keyword phpCoreConstant contained MAXDB_COMPNAME MAXDB_APPLICATION MAXDB_APPVERSION MAXDB_SQLMODE MAXDB_UNICODE MAXDB_TIMEOUT MAXDB_ISOLATIONLEVEL MAXDB_PACKETCOUNT MAXDB_STATEMENTCACHESIZE MAXDB_CURSORPREFIX MAXDB_ASSOC MAXDB_ASSOC_UPPER MAXDB_ASSOC_LOWER MAXDB_BOTH MAXDB_NUM
1582 syn keyword phpFunctions contained maxdb_affected_rows maxdb_autocommit maxdb_bind_param maxdb_bind_result maxdb_change_user maxdb_character_set_name maxdb_client_encoding maxdb_close_long_data maxdb_close maxdb_commit maxdb_connect_errno maxdb_connect_error maxdb_connect maxdb_data_seek maxdb_debug maxdb_disable_reads_from_master maxdb_disable_rpl_parse maxdb_dump_debug_info maxdb_embedded_connect maxdb_enable_reads_from_master maxdb_enable_rpl_parse maxdb_errno maxdb_error maxdb_escape_string maxdb_execute maxdb_fetch_array maxdb_fetch_assoc maxdb_fetch_field_direct maxdb_fetch_field maxdb_fetch_fields maxdb_fetch_lengths maxdb_fetch_object maxdb_fetch_row maxdb_fetch maxdb_field_count maxdb_field_seek maxdb_field_tell maxdb_free_result maxdb_get_client_info maxdb_get_client_version maxdb_get_host_info maxdb_get_metadata maxdb_get_proto_info maxdb_get_server_info maxdb_get_server_version maxdb_info maxdb_init maxdb_insert_id maxdb_kill maxdb_master_query maxdb_more_results
1583 syn keyword phpFunctions contained maxdb_multi_query maxdb_next_result maxdb_num_fields maxdb_num_rows maxdb_options maxdb_param_count maxdb_ping maxdb_prepare maxdb_query maxdb_real_connect maxdb_real_escape_string maxdb_real_query maxdb_report maxdb_rollback maxdb_rpl_parse_enabled maxdb_rpl_probe maxdb_rpl_query_type maxdb_select_db maxdb_send_long_data maxdb_send_query maxdb_server_end maxdb_server_init maxdb_set_opt maxdb_sqlstate maxdb_ssl_set maxdb_stat maxdb_stmt_affected_rows maxdb_stmt_bind_param maxdb_stmt_bind_result maxdb_stmt_close_long_data maxdb_stmt_close maxdb_stmt_data_seek maxdb_stmt_errno maxdb_stmt_error maxdb_stmt_execute maxdb_stmt_fetch maxdb_stmt_free_result maxdb_stmt_init maxdb_stmt_num_rows maxdb_stmt_param_count maxdb_stmt_prepare maxdb_stmt_reset maxdb_stmt_result_metadata maxdb_stmt_send_long_data maxdb_stmt_sqlstate maxdb_stmt_store_result maxdb_store_result maxdb_thread_id maxdb_thread_safe maxdb_use_result maxdb_warning_count
1584
1585 " MCAL functions
1586 syn keyword phpCoreConstant contained MCAL_SUNDAY MCAL_MONDAY MCAL_TUESDAY MCAL_WEDNESDAY MCAL_THURSDAY MCAL_FRIDAY MCAL_SATURDAY MCAL_JANUARY MCAL_FEBRUARY MCAL_MARCH MCAL_APRIL MCAL_MAY MCAL_JUNE MCAL_JULY MCAL_AUGUST MCAL_SEPTEMBER MCAL_OCTOBER MCAL_NOVEMBER MCAL_DECEMBER MCAL_RECUR_NONE MCAL_RECUR_DAILY MCAL_RECUR_WEEKLY MCAL_RECUR_MONTHLY_MDAY MCAL_RECUR_MONTHLY_WDAY MCAL_RECUR_YEARLY MCAL_M_SUNDAY MCAL_M_MONDAY MCAL_M_TUESDAY MCAL_M_WEDNESDAY MCAL_M_THURSDAY MCAL_M_FRIDAY MCAL_M_SATURDAY MCAL_M_WEEKDAYS MCAL_M_WEEKEND MCAL_M_ALLDAYS
1587 syn keyword phpFunctions contained mcal_append_event mcal_close mcal_create_calendar mcal_date_compare mcal_date_valid mcal_day_of_week mcal_day_of_year mcal_days_in_month mcal_delete_calendar mcal_delete_event mcal_event_add_attribute mcal_event_init mcal_event_set_alarm mcal_event_set_category mcal_event_set_class mcal_event_set_description mcal_event_set_end mcal_event_set_recur_daily mcal_event_set_recur_monthly_mday mcal_event_set_recur_monthly_wday mcal_event_set_recur_none mcal_event_set_recur_weekly mcal_event_set_recur_yearly mcal_event_set_start mcal_event_set_title mcal_expunge mcal_fetch_current_stream_event mcal_fetch_event mcal_is_leap_year mcal_list_alarms mcal_list_events mcal_next_recurrence mcal_open mcal_popen mcal_rename_calendar mcal_reopen mcal_snooze mcal_store_event mcal_time_valid mcal_week_of_year
1588
1589 " Mcrypt Encryption functions
1590 syn keyword phpCoreConstant contained MCRYPT_MODE_ECB MCRYPT_MODE_CBC MCRYPT_MODE_CFB MCRYPT_MODE_OFB MCRYPT_MODE_NOFB MCRYPT_MODE_STREAM MCRYPT_ENCRYPT MCRYPT_DECRYPT MCRYPT_DEV_RANDOM MCRYPT_DEV_URANDOM MCRYPT_RAND MCRYPT_3DES MCRYPT_ARCFOUR_IV MCRYPT_ARCFOUR MCRYPT_BLOWFISH MCRYPT_CAST_128 MCRYPT_CAST_256 MCRYPT_CRYPT MCRYPT_DES MCRYPT_DES_COMPAT MCRYPT_ENIGMA MCRYPT_GOST MCRYPT_IDEA MCRYPT_LOKI97 MCRYPT_MARS MCRYPT_PANAMA MCRYPT_RIJNDAEL_128 MCRYPT_RIJNDAEL_192 MCRYPT_RIJNDAEL_256 MCRYPT_RC2 MCRYPT_RC4 MCRYPT_RC6 MCRYPT_RC6_128 MCRYPT_RC6_192 MCRYPT_RC6_256 MCRYPT_SAFER64 MCRYPT_SAFER128 MCRYPT_SAFERPLUS MCRYPT_SERPENT(libmcrypt MCRYPT_SERPENT_128 MCRYPT_SERPENT_192 MCRYPT_SERPENT_256 MCRYPT_SKIPJACK MCRYPT_TEAN MCRYPT_THREEWAY MCRYPT_TRIPLEDES MCRYPT_TWOFISH MCRYPT_TWOFISH128 MCRYPT_TWOFISH192 MCRYPT_TWOFISH256 MCRYPT_WAKE MCRYPT_XTEA
1591 syn keyword phpFunctions contained mcrypt_cbc mcrypt_cfb mcrypt_create_iv mcrypt_decrypt mcrypt_ecb mcrypt_enc_get_algorithms_name mcrypt_enc_get_block_size mcrypt_enc_get_iv_size mcrypt_enc_get_key_size mcrypt_enc_get_modes_name mcrypt_enc_get_supported_key_sizes mcrypt_enc_is_block_algorithm_mode mcrypt_enc_is_block_algorithm mcrypt_enc_is_block_mode mcrypt_enc_self_test mcrypt_encrypt mcrypt_generic_deinit mcrypt_generic_end mcrypt_generic_init mcrypt_generic mcrypt_get_block_size mcrypt_get_cipher_name mcrypt_get_iv_size mcrypt_get_key_size mcrypt_list_algorithms mcrypt_list_modes mcrypt_module_close mcrypt_module_get_algo_block_size mcrypt_module_get_algo_key_size mcrypt_module_get_supported_key_sizes mcrypt_module_is_block_algorithm_mode mcrypt_module_is_block_algorithm mcrypt_module_is_block_mode mcrypt_module_open mcrypt_module_self_test mcrypt_ofb mdecrypt_generic
1592
1593 " MCVE (Monetra) Payment functions
1594 syn keyword phpCoreConstant contained M_PENDING M_DONE M_ERROR M_FAIL M_SUCCESS
1595 syn keyword phpFunctions contained m_checkstatus m_completeauthorizations m_connect m_connectionerror m_deletetrans m_destroyconn m_destroyengine m_getcell m_getcellbynum m_getcommadelimited m_getheader m_initconn m_initengine m_iscommadelimited m_maxconntimeout m_monitor m_numcolumns m_numrows m_parsecommadelimited m_responsekeys m_responseparam m_returnstatus m_setblocking m_setdropfile m_setip m_setssl_cafile m_setssl_files m_setssl m_settimeout m_sslcert_gen_hash m_transactionssent m_transinqueue m_transkeyval m_transnew m_transsend m_uwait m_validateidentifier m_verifyconnection m_verifysslcert
1596
1597 " Memcache functions
1598 syn keyword phpClasses contained Memcache
1599 syn keyword phpCoreConstant contained MEMCACHE_COMPRESSED MEMCACHE_HAVE_SESSION
1600 syn keyword phpFunctions contained memcache_add memcache_add_server memcache_close memcache_connect memcache_debug memcache_decrement memcache_delete memcache_flush memcache_get memcache_get_extended_stats memcache_get_server_status memcache_get_stats memcache_get_version memcache_increment memcache_pconnect memcache_replace memcache_set memcache_set_compress_threshold memcache_set_server_params
1601
1602 " MHash functions
1603 syn keyword phpCoreConstant contained MHASH_ADLER32 MHASH_CRC32 MHASH_CRC32B MHASH_GOST MHASH_HAVAL128 MHASH_HAVAL160 MHASH_HAVAL192 MHASH_HAVAL256 MHASH_MD4 MHASH_MD5 MHASH_RIPEMD160 MHASH_SHA1 MHASH_SHA256 MHASH_TIGER MHASH_TIGER128 MHASH_TIGER160
1604 syn keyword phpFunctions contained mhash_count mhash_get_block_size mhash_get_hash_name mhash_keygen_s2k mhash
1605
1606 " Mimetype functions
1607 " NOTE: has been deprecated in favour of the Fileinfo extension
1608 " syn keyword phpFunctions contained mime_content_type
1609
1610 " Ming functions for flash
1611 " NOTE: this extension is experimental
1612 " syn keyword phpCoreConstant contained MING_NEW MING_ZLIB SWFBUTTON_HIT SWFBUTTON_DOWN SWFBUTTON_OVER SWFBUTTON_UP SWFBUTTON_MOUSEUPOUTSIDE SWFBUTTON_DRAGOVER SWFBUTTON_DRAGOUT SWFBUTTON_MOUSEUP SWFBUTTON_MOUSEDOWN SWFBUTTON_MOUSEOUT SWFBUTTON_MOUSEOVER SWFFILL_RADIAL_GRADIENT SWFFILL_LINEAR_GRADIENT SWFFILL_TILED_BITMAP SWFFILL_CLIPPED_BITMAP SWFTEXTFIELD_HASLENGTH SWFTEXTFIELD_NOEDIT SWFTEXTFIELD_PASSWORD SWFTEXTFIELD_MULTILINE SWFTEXTFIELD_WORDWRAP SWFTEXTFIELD_DRAWBOX SWFTEXTFIELD_NOSELECT SWFTEXTFIELD_HTML SWFTEXTFIELD_ALIGN_LEFT SWFTEXTFIELD_ALIGN_RIGHT SWFTEXTFIELD_ALIGN_CENTER SWFTEXTFIELD_ALIGN_JUSTIFY SWFACTION_ONLOAD SWFACTION_ENTERFRAME SWFACTION_UNLOAD SWFACTION_MOUSEMOVE SWFACTION_MOUSEDOWN SWFACTION_MOUSEUP SWFACTION_KEYDOWN SWFACTION_KEYUP SWFACTION_DATA
1613 " syn keyword phpClasses contained SWFAction SWFBitmap SWFButton SWFDisplayItem SWFFill SWFFont SWFFontChar SWFGradient SWFMorph SWFMovie SWFPrebuiltClip SWFShape SWFSound SWFSoundInstance SWFSprite SWFText SWFTextField SWFVideoStream
1614 " syn keyword phpFunctions contained ming_keypress ming_setcubicthreshold ming_setscale ming_setswfcompression ming_useconstants ming_useswfversion
1615
1616 " Miscellaneous functions
1617 " NOTE: php_check_syntax was removed after PHP 5.0.4
1618 " NOTE: some of the functions like exit() and die() are defined elsewhere
1619 syn keyword phpCoreConstant contained CONNECTION_ABORTED CONNECTION_NORMAL CONNECTION_TIMEOUT __COMPILER_HALT_OFFSET__
1620 syn keyword phpFunctions contained connection_aborted connection_status connection_timeout constant define defined get_browser highlight_file highlight_string ignore_user_abort pack php_strip_whitespace show_source sleep sys_getloadavg time_nanosleep time_sleep_until uniqid unpack usleep
1621
1622 " mnoGoSearch functions
1623 syn keyword phpCoreConstant contained UDM_FIELD_URLID UDM_FIELD_URL UDM_FIELD_CONTENT UDM_FIELD_TITLE UDM_FIELD_KEYWORDS UDM_FIELD_DESC UDM_FIELD_DESCRIPTION UDM_FIELD_TEXT UDM_FIELD_SIZE UDM_FIELD_RATING UDM_FIELD_SCORE UDM_FIELD_MODIFIED UDM_FIELD_ORDER UDM_FIELD_CRC UDM_FIELD_CATEGORY UDM_FIELD_LANG UDM_FIELD_CHARSET UDM_PARAM_PAGE_SIZE UDM_PARAM_PAGE_NUM UDM_PARAM_SEARCH_MODE UDM_PARAM_CACHE_MODE UDM_PARAM_TRACK_MODE UDM_PARAM_PHRASE_MODE UDM_PARAM_CHARSET UDM_PARAM_LOCAL_CHARSET UDM_PARAM_BROWSER_CHARSET UDM_PARAM_STOPTABLE UDM_PARAM_STOP_TABLE UDM_PARAM_STOPFILE UDM_PARAM_STOP_FILE UDM_PARAM_WEIGHT_FACTOR UDM_PARAM_WORD_MATCH UDM_PARAM_MAX_WORD_LEN UDM_PARAM_MAX_WORDLEN UDM_PARAM_MIN_WORD_LEN UDM_PARAM_MIN_WORDLEN UDM_PARAM_ISPELL_PREFIXES UDM_PARAM_ISPELL_PREFIX UDM_PARAM_PREFIXES UDM_PARAM_PREFIX UDM_PARAM_CROSS_WORDS UDM_PARAM_CROSSWORDS UDM_PARAM_VARDIR UDM_PARAM_DATADIR UDM_PARAM_HLBEG UDM_PARAM_HLEND UDM_PARAM_SYNONYM UDM_PARAM_SEARCHD UDM_PARAM_QSTRING UDM_PARAM_REMOTE_ADDR UDM_LIMIT_CAT UDM_LIMIT_URL UDM_LIMIT_TAG UDM_LIMIT_LANG UDM_LIMIT_DATE UDM_PARAM_FOUND UDM_PARAM_NUM_ROWS UDM_PARAM_WORDINFO UDM_PARAM_WORD_INFO UDM_PARAM_SEARCHTIME UDM_PARAM_SEARCH_TIME UDM_PARAM_FIRST_DOC UDM_PARAM_LAST_DOC UDM_MODE_ALL UDM_MODE_ANY UDM_MODE_BOOL UDM_MODE_PHRASE UDM_CACHE_ENABLED UDM_CACHE_DISABLED UDM_TRACK_ENABLED UDM_TRACK_DISABLED UDM_PHRASE_ENABLED UDM_PHRASE_DISABLED UDM_CROSS_WORDS_ENABLED UDM_CROSSWORDS_ENABLED UDM_CROSS_WORDS_DISABLED UDM_CROSSWORDS_DISABLED UDM_PREFIXES_ENABLED UDM_PREFIX_ENABLED UDM_ISPELL_PREFIXES_ENABLED UDM_ISPELL_PREFIX_ENABLED UDM_PREFIXES_DISABLED UDM_PREFIX_DISABLED UDM_ISPELL_PREFIXES_DISABLED UDM_ISPELL_PREFIX_DISABLED UDM_ISPELL_TYPE_AFFIX UDM_ISPELL_TYPE_SPELL UDM_ISPELL_TYPE_DB UDM_ISPELL_TYPE_SERVER UDM_MATCH_WORD UDM_MATCH_BEGIN UDM_MATCH_SUBSTR UDM_MATCH_END
1624 syn keyword phpFunctions contained udm_add_search_limit udm_alloc_agent_array udm_alloc_agent udm_api_version udm_cat_list udm_cat_path udm_check_charset udm_check_stored udm_clear_search_limits udm_close_stored udm_crc32 udm_errno udm_error udm_find udm_free_agent udm_free_ispell_data udm_free_res udm_get_doc_count udm_get_res_field udm_get_res_param udm_hash32 udm_load_ispell_data udm_open_stored udm_set_agent_param
1625
1626 " Microsoft SQL server functions
1627 syn keyword phpCoreConstant contained MSSQL_ASSOC MSSQL_NUM MSSQL_BOTH SQLTEXT SQLVARCHAR SQLCHAR SQLINT1 SQLINT2 SQLINT4 SQLBIT SQLFLT8
1628 syn keyword phpFunctions contained mssql_bind mssql_close mssql_connect mssql_data_seek mssql_execute mssql_fetch_array mssql_fetch_assoc mssql_fetch_batch mssql_fetch_field mssql_fetch_object mssql_fetch_row mssql_field_length mssql_field_name mssql_field_seek mssql_field_type mssql_free_result mssql_free_statement mssql_get_last_message mssql_guid_string mssql_init mssql_min_error_severity mssql_min_message_severity mssql_next_result mssql_num_fields mssql_num_rows mssql_pconnect mssql_query mssql_result mssql_rows_affected mssql_select_db
1629
1630 " Mohawk Software Session Handler Functions
1631 syn keyword phpFunctions contained msession_connect msession_count msession_create msession_destroy msession_disconnect msession_find msession_get_array msession_get_data msession_get msession_inc msession_list msession_listvar msession_lock msession_plugin msession_randstr msession_set_array msession_set_data msession_set msession_timeout msession_uniq msession_unlock
1632
1633 " mSQL functions
1634 syn keyword phpCoreConstant contained MSQL_ASSOC MSQL_NUM MSQL_BOTH
1635 syn keyword phpFunctions contained msql_affected_rows msql_close msql_connect msql_create_db msql_createdb msql_data_seek msql_db_query msql_dbname msql_drop_db msql_error msql_fetch_array msql_fetch_field msql_fetch_object msql_fetch_row msql_field_flags msql_field_len msql_field_name msql_field_seek msql_field_table msql_field_type msql_fieldflags msql_fieldlen msql_fieldname msql_fieldtable msql_fieldtype msql_free_result msql_list_dbs msql_list_fields msql_list_tables msql_num_fields msql_num_rows msql_numfields msql_numrows msql_pconnect msql_query msql_regcase msql_result msql_select_db msql_tablename msql
1636
1637 " Multibyte string functions
1638 syn keyword phpCoreConstant contained MB_OVERLOAD_MAIL MB_OVERLOAD_STRING MB_OVERLOAD_REGEX MB_CASE_UPPER MB_CASE_LOWER MB_CASE_TITLE
1639 syn keyword phpFunctions contained mb_check_encoding mb_convert_case mb_convert_encoding mb_convert_kana mb_convert_variables mb_decode_mimeheader mb_decode_numericentity mb_detect_encoding mb_detect_order mb_encode_mimeheader mb_encode_numericentity mb_ereg_match mb_ereg_replace mb_ereg_search_getpos mb_ereg_search_getregs mb_ereg_search_init mb_ereg_search_pos mb_ereg_search_regs mb_ereg_search_setpos mb_ereg_search mb_ereg mb_eregi_replace mb_eregi mb_get_info mb_http_input mb_http_output mb_internal_encoding mb_language mb_output_handler mb_parse_str mb_preferred_mime_name mb_regex_encoding mb_regex_set_options mb_send_mail mb_split mb_strcut mb_strimwidth mb_stripos mb_stristr mb_strlen mb_strpos mb_strrchr mb_strrichr mb_strripos mb_strrpos mb_strstr mb_strtolower mb_strtoupper mb_strwidth mb_substitute_character mb_substr_count mb_substr
1640
1641 " muscat functions
1642 " NOTE: Experimental, doesn't seem to be necessary any more
1643
1644 " MySQL functions
1645 syn keyword phpCoreConstant contained MYSQL_CLIENT_COMPRESS MYSQL_CLIENT_IGNORE_SPACE MYSQL_CLIENT_INTERACTIVE MYSQL_CLIENT_SSL MYSQL_ASSOC MYSQL_BOTH MYSQL_NUM
1646 syn keyword phpFunctions contained mysql_affected_rows mysql_change_user mysql_client_encoding mysql_close mysql_connect mysql_create_db mysql_data_seek mysql_db_name mysql_db_query mysql_drop_db mysql_errno mysql_error mysql_escape_string mysql_fetch_array mysql_fetch_assoc mysql_fetch_field mysql_fetch_lengths mysql_fetch_object mysql_fetch_row mysql_field_flags mysql_field_len mysql_field_name mysql_field_seek mysql_field_table mysql_field_type mysql_free_result mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql_insert_id mysql_list_dbs mysql_list_fields mysql_list_processes mysql_list_tables mysql_num_fields mysql_num_rows mysql_pconnect mysql_ping mysql_query mysql_real_escape_string mysql_result mysql_select_db mysql_set_charset mysql_stat mysql_tablename mysql_thread_id mysql_unbuffered_query
1647
1648 " MySQL Improved extension
1649 syn keyword phpClasses contained mysqli mysqli_stmt mysqli_result
1650 syn keyword phpCoreConstant contained MYSQLI_READ_DEFAULT_GROUP MYSQLI_READ_DEFAULT_FILE MYSQLI_OPT_CONNECT_TIMEOUT MYSQLI_OPT_LOCAL_INFILE MYSQLI_INIT_COMMAND MYSQLI_CLIENT_SSL MYSQLI_CLIENT_COMPRESS MYSQLI_CLIENT_INTERACTIVE MYSQLI_CLIENT_IGNORE_SPACE MYSQLI_CLIENT_NO_SCHEMA MYSQLI_CLIENT_MULTI_QUERIES MYSQLI_STORE_RESULT MYSQLI_USE_RESULT MYSQLI_ASSOC MYSQLI_NUM MYSQLI_BOTH MYSQLI_NOT_NULL_FLAG MYSQLI_PRI_KEY_FLAG MYSQLI_UNIQUE_KEY_FLAG MYSQLI_MULTIPLE_KEY_FLAG MYSQLI_BLOB_FLAG MYSQLI_UNSIGNED_FLAG MYSQLI_ZEROFILL_FLAG MYSQLI_AUTO_INCREMENT_FLAG MYSQLI_TIMESTAMP_FLAG MYSQLI_SET_FLAG MYSQLI_NUM_FLAG MYSQLI_PART_KEY_FLAG MYSQLI_GROUP_FLAG MYSQLI_TYPE_DECIMAL MYSQLI_TYPE_NEWDECIMAL MYSQLI_TYPE_BIT MYSQLI_TYPE_TINY MYSQLI_TYPE_SHORT MYSQLI_TYPE_LONG MYSQLI_TYPE_FLOAT MYSQLI_TYPE_DOUBLE MYSQLI_TYPE_NULL MYSQLI_TYPE_TIMESTAMP MYSQLI_TYPE_LONGLONG MYSQLI_TYPE_INT24 MYSQLI_TYPE_DATE MYSQLI_TYPE_TIME MYSQLI_TYPE_DATETIME MYSQLI_TYPE_YEAR MYSQLI_TYPE_NEWDATE MYSQLI_TYPE_ENUM MYSQLI_TYPE_SET MYSQLI_TYPE_TINY_BLOB MYSQLI_TYPE_MEDIUM_BLOB MYSQLI_TYPE_LONG_BLOB MYSQLI_TYPE_BLOB MYSQLI_TYPE_VAR_STRING MYSQLI_TYPE_STRING MYSQLI_TYPE_GEOMETRY MYSQLI_NEED_DATA MYSQLI_NO_DATA MYSQLI_DATA_TRUNCATED
1651 syn keyword phpFunctions contained mysqli_affected_rows mysqli_autocommit mysqli_bind_param mysqli_bind_result mysqli_change_user mysqli_character_set_name mysqli_client_encoding mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_disable_reads_from_master mysqli_disable_rpl_parse mysqli_dump_debug_info mysqli_embedded_server_end mysqli_embedded_server_start mysqli_enable_reads_from_master mysqli_enable_rpl_parse mysqli_errno mysqli_error mysqli_escape_string mysqli_execute mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_fetch mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_version mysqli_get_host_info mysqli_get_metadata mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_get_warnings
1652 syn keyword phpFunctions contained mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_master_query mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_param_count mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_report mysqli_rollback mysqli_rpl_parse_enabled mysqli_rpl_probe mysqli_rpl_query_type mysqli_select_db mysqli_send_long_data mysqli_send_query mysqli_server_end mysqli_server_init mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_set_opt mysqli_slave_query mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_affected_rows mysqli_stmt_attr_get mysqli_stmt_attr_set mysqli_stmt_bind_param mysqli_stmt_bind_result mysqli_stmt_close mysqli_stmt_data_seek mysqli_stmt_errno mysqli_stmt_error mysqli_stmt_execute mysqli_stmt_fetch mysqli_stmt_field_count mysqli_stmt_free_result mysqli_stmt_get_warnings
1653 syn keyword phpFunctions contained mysqli_stmt_init mysqli_stmt_insert_id mysqli_stmt_num_rows mysqli_stmt_param_count mysqli_stmt_prepare mysqli_stmt_reset mysqli_stmt_result_metadata mysqli_stmt_send_long_data mysqli_stmt_sqlstate mysqli_stmt_store_result mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count
1654
1655 " ncurses extension
1656 " NOTE: this extension is experimental
1657 syn keyword phpCoreConstant contained NCURSES_ERR NCURSES_COLOR_BLACK NCURSES_COLOR_WHITE NCURSES_COLOR_RED NCURSES_COLOR_GREEN NCURSES_COLOR_YELLOW NCURSES_COLOR_BLUE NCURSES_COLOR_CYAN NCURSES_COLOR_MAGENTA
1658 " Keyboard
1659 syn match phpCoreConstant contained /\<NCURSES_KEY_F\%(6[0-4]\=\|[1-5][0-9]\|[0-9]\)\>/
1660 syn keyword phpCoreConstant contained NCURSES_KEY_DOWN NCURSES_KEY_UP NCURSES_KEY_LEFT NCURSES_KEY_RIGHT NCURSES_KEY_HOME NCURSES_KEY_BACKSPACE NCURSES_KEY_DL NCURSES_KEY_IL NCURSES_KEY_DC NCURSES_KEY_IC NCURSES_KEY_EIC NCURSES_KEY_CLEAR NCURSES_KEY_EOS NCURSES_KEY_EOL NCURSES_KEY_SF NCURSES_KEY_SR NCURSES_KEY_NPAGE NCURSES_KEY_PPAGE NCURSES_KEY_STAB NCURSES_KEY_CTAB NCURSES_KEY_CATAB NCURSES_KEY_SRESET NCURSES_KEY_RESET NCURSES_KEY_PRINT NCURSES_KEY_LL NCURSES_KEY_A1 NCURSES_KEY_A3 NCURSES_KEY_B2 NCURSES_KEY_C1 NCURSES_KEY_C3 NCURSES_KEY_BTAB NCURSES_KEY_BEG NCURSES_KEY_CANCEL NCURSES_KEY_CLOSE NCURSES_KEY_COMMAND NCURSES_KEY_COPY NCURSES_KEY_CREATE NCURSES_KEY_END NCURSES_KEY_EXIT NCURSES_KEY_FIND NCURSES_KEY_HELP NCURSES_KEY_MARK NCURSES_KEY_MESSAGE NCURSES_KEY_MOVE NCURSES_KEY_NEXT NCURSES_KEY_OPEN NCURSES_KEY_OPTIONS NCURSES_KEY_PREVIOUS NCURSES_KEY_REDO NCURSES_KEY_REFERENCE NCURSES_KEY_REFRESH NCURSES_KEY_REPLACE NCURSES_KEY_RESTART NCURSES_KEY_RESUME
1661 syn keyword phpCoreConstant contained NCURSES_KEY_SAVE NCURSES_KEY_SBEG NCURSES_KEY_SCANCEL NCURSES_KEY_SCOMMAND NCURSES_KEY_SCOPY NCURSES_KEY_SCREATE NCURSES_KEY_SDC NCURSES_KEY_SDL NCURSES_KEY_SELECT NCURSES_KEY_SEND NCURSES_KEY_SEOL NCURSES_KEY_SEXIT NCURSES_KEY_SFIND NCURSES_KEY_SHELP NCURSES_KEY_SHOME NCURSES_KEY_SIC NCURSES_KEY_SLEFT NCURSES_KEY_SMESSAGE NCURSES_KEY_SMOVE NCURSES_KEY_SNEXT NCURSES_KEY_SOPTIONS NCURSES_KEY_SPREVIOUS NCURSES_KEY_SPRINT NCURSES_KEY_SREDO NCURSES_KEY_SREPLACE NCURSES_KEY_SRIGHT NCURSES_KEY_SRSUME NCURSES_KEY_SSAVE NCURSES_KEY_SSUSPEND NCURSES_KEY_UNDO NCURSES_KEY_MOUSE NCURSES_KEY_MAX
1662 " Mouse
1663 syn keyword phpCoreConstant contained NCURSES_BUTTON1_RELEASED NCURSES_BUTTON2_RELEASED NCURSES_BUTTON3_RELEASED NCURSES_BUTTON4_RELEASED NCURSES_BUTTON1_PRESSED NCURSES_BUTTON2_PRESSED NCURSES_BUTTON3_PRESSED NCURSES_BUTTON4_PRESSED NCURSES_BUTTON1_CLICKED NCURSES_BUTTON2_CLICKED NCURSES_BUTTON3_CLICKED NCURSES_BUTTON4_CLICKED NCURSES_BUTTON1_DOUBLE_CLICKED NCURSES_BUTTON2_DOUBLE_CLICKED NCURSES_BUTTON3_DOUBLE_CLICKED NCURSES_BUTTON4_DOUBLE_CLICKED NCURSES_BUTTON1_TRIPLE_CLICKED NCURSES_BUTTON2_TRIPLE_CLICKED NCURSES_BUTTON3_TRIPLE_CLICKED NCURSES_BUTTON4_TRIPLE_CLICKED NCURSES_BUTTON_CTRL NCURSES_BUTTON_SHIFT NCURSES_BUTTON_ALT NCURSES_ALL_MOUSE_EVENTS NCURSES_REPORT_MOUSE_POSITION
1664 " Functions
1665 syn keyword phpFunctions contained ncurses_addch ncurses_addchnstr ncurses_addchstr ncurses_addnstr ncurses_addstr ncurses_assume_default_colors ncurses_attroff ncurses_attron ncurses_attrset ncurses_baudrate ncurses_beep ncurses_bkgd ncurses_bkgdset ncurses_border ncurses_bottom_panel ncurses_can_change_color ncurses_cbreak ncurses_clear ncurses_clrtobot ncurses_clrtoeol ncurses_color_content ncurses_color_set ncurses_curs_set ncurses_def_prog_mode ncurses_def_shell_mode ncurses_define_key ncurses_del_panel ncurses_delay_output ncurses_delch ncurses_deleteln ncurses_delwin ncurses_doupdate ncurses_echo ncurses_echochar ncurses_end ncurses_erase ncurses_erasechar ncurses_filter ncurses_flash ncurses_flushinp ncurses_getch ncurses_getmaxyx ncurses_getmouse ncurses_getyx ncurses_halfdelay ncurses_has_colors ncurses_has_ic ncurses_has_il ncurses_has_key ncurses_hide_panel ncurses_hline ncurses_inch ncurses_init_color ncurses_init_pair
1666 syn keyword phpFunctions contained ncurses_init ncurses_insch ncurses_insdelln ncurses_insertln ncurses_insstr ncurses_instr ncurses_isendwin ncurses_keyok ncurses_keypad ncurses_killchar ncurses_longname ncurses_meta ncurses_mouse_trafo ncurses_mouseinterval ncurses_mousemask ncurses_move_panel ncurses_move ncurses_mvaddch ncurses_mvaddchnstr ncurses_mvaddchstr ncurses_mvaddnstr ncurses_mvaddstr ncurses_mvcur ncurses_mvdelch ncurses_mvgetch ncurses_mvhline ncurses_mvinch ncurses_mvvline ncurses_mvwaddstr ncurses_napms ncurses_new_panel ncurses_newpad ncurses_newwin ncurses_nl ncurses_nocbreak ncurses_noecho ncurses_nonl ncurses_noqiflush ncurses_noraw ncurses_pair_content ncurses_panel_above ncurses_panel_below ncurses_panel_window ncurses_pnoutrefresh ncurses_prefresh ncurses_putp ncurses_qiflush ncurses_raw ncurses_refresh ncurses_replace_panel ncurses_reset_prog_mode ncurses_reset_shell_mode ncurses_resetty ncurses_savetty
1667 syn keyword phpFunctions contained ncurses_scr_dump ncurses_scr_init ncurses_scr_restore ncurses_scr_set ncurses_scrl ncurses_show_panel ncurses_slk_attr ncurses_slk_attroff ncurses_slk_attron ncurses_slk_attrset ncurses_slk_clear ncurses_slk_color ncurses_slk_init ncurses_slk_noutrefresh ncurses_slk_refresh ncurses_slk_restore ncurses_slk_set ncurses_slk_touch ncurses_standend ncurses_standout ncurses_start_color ncurses_termattrs ncurses_termname ncurses_timeout ncurses_top_panel ncurses_typeahead ncurses_ungetch ncurses_ungetmouse ncurses_update_panels ncurses_use_default_colors ncurses_use_env ncurses_use_extended_names ncurses_vidattr ncurses_vline ncurses_waddch ncurses_waddstr ncurses_wattroff ncurses_wattron ncurses_wattrset ncurses_wborder ncurses_wclear ncurses_wcolor_set ncurses_werase ncurses_wgetch ncurses_whline ncurses_wmouse_trafo ncurses_wmove ncurses_wnoutrefresh ncurses_wrefresh ncurses_wstandend ncurses_wstandout ncurses_wvline
1668
1669 " network functions
1670 syn keyword phpCoreConstant contained LOG_CONS LOG_NDELAY LOG_ODELAY LOG_NOWAIT LOG_PERROR LOG_PID LOG_AUTH LOG_AUTHPRIV LOG_CRON LOG_DAEMON LOG_KERN LOG_LOCAL0 LOG_LPR LOG_MAIL LOG_NEWS LOG_SYSLOG LOG_USER LOG_UUCP LOG_EMERG LOG_ALERT LOG_CRIT LOG_ERR LOG_WARNING LOG_NOTICE LOG_INFO LOG_DEBUG DNS_A DNS_MX DNS_CNAME DNS_NS DNS_PTR DNS_HINFO DNS_SOA DNS_TXT DNS_ANY DNS_AAAA DNS_ALL
1671 syn keyword phpFunctions contained checkdnsrr closelog debugger_off debugger_on define_syslog_variables dns_check_record dns_get_mx dns_get_record fsockopen gethostbyaddr gethostbyname gethostbynamel getmxrr getprotobyname getprotobynumber getservbyname getservbyport header headers_list headers_sent inet_ntop inet_pton ip2long long2ip openlog pfsockopen setcookie setrawcookie socket_get_status socket_set_blocking socket_set_timeout syslog
1672
1673 " newt functions
1674 syn keyword phpCoreConstant contained NEWT_EXIT_HOTKEY NEWT_EXIT_COMPONENT NEWT_EXIT_FDREADY NEWT_EXIT_TIMER NEWT_COLORSET_ROOT NEWT_COLORSET_BORDER NEWT_COLORSET_WINDOW NEWT_COLORSET_SHADOW NEWT_COLORSET_TITLE NEWT_COLORSET_BUTTON NEWT_COLORSET_ACTBUTTON NEWT_COLORSET_CHECKBOX NEWT_COLORSET_ACTCHECKBOX NEWT_COLORSET_ENTRY NEWT_COLORSET_LABEL NEWT_COLORSET_LISTBOX NEWT_COLORSET_ACTLISTBOX NEWT_COLORSET_TEXTBOX NEWT_COLORSET_ACTTEXTBOX NEWT_COLORSET_HELPLINE NEWT_COLORSET_ROOTTEXT NEWT_COLORSET_ROOTTEXT NEWT_COLORSET_EMPTYSCALE NEWT_COLORSET_FULLSCALE NEWT_COLORSET_DISENTRY NEWT_COLORSET_COMPACTBUTTON NEWT_COLORSET_ACTSELLISTBOX NEWT_COLORSET_SELLISTBOX NEWT_FLAGS_SET NEWT_FLAGS_RESET NEWT_FLAGS_TOGGLE NEWT_FLAG_RETURNEXIT NEWT_FLAG_HIDDEN NEWT_FLAG_SCROLL NEWT_FLAG_DISABLED NEWT_FLAG_BORDER NEWT_FLAG_WRAP NEWT_FLAG_NOF12 NEWT_FLAG_MULTIPLE NEWT_FLAG_SELECTED NEWT_FLAG_CHECKBOX NEWT_FLAG_PASSWORD NEWT_FLAG_SHOWCURSOR NEWT_FD_READ NEWT_FD_WRITE NEWT_FD_EXCEPT NEWT_CHECKBOXTREE_UNSELECTABLE
1675 syn keyword phpCoreConstant contained NEWT_CHECKBOXTREE_HIDE_BOX NEWT_CHECKBOXTREE_COLLAPSED NEWT_CHECKBOXTREE_EXPANDED NEWT_CHECKBOXTREE_UNSELECTED NEWT_CHECKBOXTREE_SELECTED NEWT_ENTRY_SCROLL NEWT_ENTRY_HIDDEN NEWT_ENTRY_RETURNEXIT NEWT_ENTRY_DISABLED NEWT_LISTBOX_RETURNEXIT NEWT_TEXTBOX_WRAP NEWT_TEXTBOX_SCROLL NEWT_FORM_NOF12 NEWT_KEY_TAB NEWT_KEY_ENTER NEWT_KEY_SUSPEND NEWT_KEY_ESCAPE NEWT_KEY_RETURN NEWT_KEY_EXTRA_BASE NEWT_KEY_UP NEWT_KEY_DOWN NEWT_KEY_LEFT NEWT_KEY_RIGHT NEWT_KEY_BKSPC NEWT_KEY_DELETE NEWT_KEY_HOME NEWT_KEY_END NEWT_KEY_UNTAB NEWT_KEY_PGUP NEWT_KEY_PGDN NEWT_KEY_INSERT NEWT_KEY_F1 NEWT_KEY_F2 NEWT_KEY_F3 NEWT_KEY_F4 NEWT_KEY_F5 NEWT_KEY_F6 NEWT_KEY_F7 NEWT_KEY_F8 NEWT_KEY_F9 NEWT_KEY_F10 NEWT_KEY_F11 NEWT_KEY_F12 NEWT_KEY_RESIZE NEWT_ANCHOR_LEFT NEWT_ANCHOR_RIGHT NEWT_ANCHOR_TOP NEWT_ANCHOR_BOTTOM NEWT_GRID_FLAG_GROWX NEWT_GRID_FLAG_GROWY NEWT_GRID_EMPTY NEWT_GRID_COMPONENT NEWT_GRID_SUBGRID
1676 syn keyword phpFunctions contained newt_bell newt_button_bar newt_button newt_centered_window newt_checkbox_get_value newt_checkbox_set_flags newt_checkbox_set_value newt_checkbox_tree_add_item newt_checkbox_tree_find_item newt_checkbox_tree_get_current newt_checkbox_tree_get_entry_value newt_checkbox_tree_get_multi_selection newt_checkbox_tree_get_selection newt_checkbox_tree_multi newt_checkbox_tree_set_current newt_checkbox_tree_set_entry_value newt_checkbox_tree_set_entry newt_checkbox_tree_set_width newt_checkbox_tree newt_checkbox newt_clear_key_buffer newt_cls newt_compact_button newt_component_add_callback newt_component_takes_focus newt_create_grid newt_cursor_off newt_cursor_on newt_delay newt_draw_form newt_draw_root_text newt_entry_get_value newt_entry_set_filter newt_entry_set_flags newt_entry_set newt_entry newt_finished newt_form_add_component newt_form_add_components newt_form_add_hot_key newt_form_destroy newt_form_get_current newt_form_run
1677 syn keyword phpFunctions contained newt_form_set_background newt_form_set_height newt_form_set_size newt_form_set_timer newt_form_set_width newt_form_watch_fd newt_form newt_get_screen_size newt_grid_add_components_to_form newt_grid_basic_window newt_grid_free newt_grid_get_size newt_grid_h_close_stacked newt_grid_h_stacked newt_grid_place newt_grid_set_field newt_grid_simple_window newt_grid_v_close_stacked newt_grid_v_stacked newt_grid_wrapped_window_at newt_grid_wrapped_window newt_init newt_label_set_text newt_label newt_listbox_append_entry newt_listbox_clear_selection newt_listbox_clear newt_listbox_delete_entry newt_listbox_get_current newt_listbox_get_selection newt_listbox_insert_entry newt_listbox_item_count newt_listbox_select_item newt_listbox_set_current_by_key newt_listbox_set_current newt_listbox_set_data newt_listbox_set_entry newt_listbox_set_width newt_listbox newt_listitem_get_data newt_listitem_set newt_listitem newt_open_window
1678 syn keyword phpFunctions contained newt_pop_help_line newt_pop_window newt_push_help_line newt_radio_get_current newt_radiobutton newt_redraw_help_line newt_reflow_text newt_refresh newt_resize_screen newt_resume newt_run_form newt_scale_set newt_scale newt_scrollbar_set newt_set_help_callback newt_set_suspend_callback newt_suspend newt_textbox_get_num_lines newt_textbox_reflowed newt_textbox_set_height newt_textbox_set_text newt_textbox newt_vertical_scrollbar newt_wait_for_key newt_win_choice newt_win_entries newt_win_menu newt_win_message newt_win_messagev newt_win_ternary
1679
1680 " NSAPI functions
1681 syn keyword phpFunctions contained nsapi_request_headers nsapi_response_headers nsapi_virtual
1682 " NOTE: these functions are also implemented by the apache module
1683 syn keyword phpCoreConstant contained apache_request_headers apache_response_headers getallheaders virtual
1684
1685 " object aggregation functions
1686 " NOTE: this extension is experimental
1687 syn keyword phpFunctions contained aggregate_info aggregate_methods_by_list aggregate_methods_by_regexp aggregate_methods aggregate_properties_by_list aggregate_properties_by_regexp aggregate_properties aggregate aggregation_info deaggregate
1688
1689 " object overloading functions
1690 " NOTE: experimental and no longer needed in PHP 5
1691 " syn keyword phpFunctions contained overload
1692
1693
1694
1695
1696
1697 " TODO: review function list from here:
1698 syn keyword phpFunctions array_change_key_case array_chunk array_combine array_count_values array_diff_assoc array_diff_uassoc array_diff array_fill array_filter array_flip array_intersect_assoc array_intersect array_key_exists array_keys array_map array_merge_recursive array_merge array_multisort array_pad array_pop array_push array_rand array_reduce array_reverse array_search array_shift array_slice array_splice array_sum array_udiff_assoc array_udiff_uassoc array_udiff array_unique array_unshift array_values array_walk arsort asort compact count current each end extract in_array key krsort ksort natcasesort natsort next pos prev range reset rsort shuffle sizeof sort uasort uksort usort contained
1699 syn keyword phpFunctions bcadd bccomp bcdiv bcmod bcmul bcpow bcpowmod bcscale bcsqrt bcsub contained
1700 syn keyword phpFunctions bzclose bzcompress bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite contained
1701 syn keyword phpFunctions cal_days_in_month cal_from_jd cal_info cal_to_jd easter_date easter_days frenchtojd gregoriantojd jddayofweek jdmonthname jdtofrench jdtogregorian jdtojewish jdtojulian jdtounix jewishtojd juliantojd unixtojd contained
1702 syn keyword phpFunctions call_user_method_array call_user_method class_exists get_class_methods get_class_vars get_class get_declared_classes get_object_vars get_parent_class is_a is_subclass_of method_exists property_exists contained
1703 syn keyword phpFunctions com VARIANT com_addref com_get com_invoke com_isenum com_load_typelib com_load com_propget com_propput com_propset com_release com_set contained
1704 syn keyword phpFunctions cpdf_add_annotation cpdf_add_outline cpdf_arc cpdf_begin_text cpdf_circle cpdf_clip cpdf_close cpdf_closepath_fill_stroke cpdf_closepath_stroke cpdf_closepath cpdf_continue_text cpdf_curveto cpdf_end_text cpdf_fill_stroke cpdf_fill cpdf_finalize_page cpdf_finalize cpdf_global_set_document_limits cpdf_import_jpeg cpdf_lineto cpdf_moveto cpdf_newpath cpdf_open cpdf_output_buffer cpdf_page_init cpdf_place_inline_image cpdf_rect cpdf_restore cpdf_rlineto cpdf_rmoveto cpdf_rotate_text cpdf_rotate cpdf_save_to_file cpdf_save cpdf_scale cpdf_set_action_url cpdf_set_char_spacing cpdf_set_creator cpdf_set_current_page cpdf_set_font_directories cpdf_set_font_map_file cpdf_set_font cpdf_set_horiz_scaling cpdf_set_keywords cpdf_set_leading cpdf_set_page_animation cpdf_set_subject cpdf_set_text_matrix cpdf_set_text_pos cpdf_set_text_rendering cpdf_set_text_rise cpdf_set_title cpdf_set_viewer_preferences cpdf_set_word_spacing cpdf_setdash cpdf_setflat cpdf_setgray_fill cpdf_setgray_stroke cpdf_setgray cpdf_setlinecap cpdf_setlinejoin cpdf_setlinewidth cpdf_setmiterlimit cpdf_setrgbcolor_fill cpdf_setrgbcolor_stroke cpdf_setrgbcolor cpdf_show_xy cpdf_show cpdf_stringwidth cpdf_stroke cpdf_text cpdf_translate contained
1705 syn keyword phpFunctions crack_check crack_closedict crack_getlastmessage crack_opendict contained
1706 syn keyword phpFunctions ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_graph ctype_lower ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit contained
1707 syn keyword phpFunctions curl_close curl_errno curl_error curl_exec curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_setopt curl_version contained
1708 syn keyword phpFunctions cybercash_base64_decode cybercash_base64_encode cybercash_decr cybercash_encr contained
1709 syn keyword phpFunctions cyrus_authenticate cyrus_bind cyrus_close cyrus_connect cyrus_query cyrus_unbind contained
1710 syn keyword phpFunctions checkdate date getdate gettimeofday gmdate gmmktime gmstrftime localtime microtime mktime strftime strtotime time contained
1711 syn keyword phpFunctions dba_close dba_delete dba_exists dba_fetch dba_firstkey dba_handlers dba_insert dba_key_split dba_list dba_nextkey dba_open dba_optimize dba_popen dba_replace dba_sync contained
1712 syn keyword phpFunctions dbase_add_record dbase_close dbase_create dbase_delete_record dbase_get_header_info dbase_get_record_with_names dbase_get_record dbase_numfields dbase_numrecords dbase_open dbase_pack dbase_replace_record contained
1713 syn keyword phpFunctions dblist dbmclose dbmdelete dbmexists dbmfetch dbmfirstkey dbminsert dbmnextkey dbmopen dbmreplace contained
1714 syn keyword phpFunctions dbplus_add dbplus_aql dbplus_chdir dbplus_close dbplus_curr dbplus_errcode dbplus_errno dbplus_find dbplus_first dbplus_flush dbplus_freealllocks dbplus_freelock dbplus_freerlocks dbplus_getlock dbplus_getunique dbplus_info dbplus_last dbplus_lockrel dbplus_next dbplus_open dbplus_prev dbplus_rchperm dbplus_rcreate dbplus_rcrtexact dbplus_rcrtlike dbplus_resolve dbplus_restorepos dbplus_rkeys dbplus_ropen dbplus_rquery dbplus_rrename dbplus_rsecindex dbplus_runlink dbplus_rzap dbplus_savepos dbplus_setindex dbplus_setindexbynumber dbplus_sql dbplus_tcl dbplus_tremove dbplus_undo dbplus_undoprepare dbplus_unlockrel dbplus_unselect dbplus_update dbplus_xlockrel dbplus_xunlockrel contained
1715 syn keyword phpFunctions dbx_close dbx_compare dbx_connect dbx_error dbx_escape_string dbx_fetch_row dbx_query dbx_sort contained
1716 syn keyword phpFunctions dio_close dio_fcntl dio_open dio_read dio_seek dio_stat dio_tcsetattr dio_truncate dio_write contained
1717 syn keyword phpFunctions chdir chroot dir closedir getcwd opendir readdir rewinddir scandir contained
1718 syn keyword phpFunctions domxml_new_doc domxml_open_file domxml_open_mem domxml_version domxml_xmltree domxml_xslt_stylesheet_doc domxml_xslt_stylesheet_file domxml_xslt_stylesheet xpath_eval_expression xpath_eval xpath_new_context xptr_eval xptr_new_context contained
1719 syn keyword phpMethods name specified value create_attribute create_cdata_section create_comment create_element_ns create_element create_entity_reference create_processing_instruction create_text_node doctype document_element dump_file dump_mem get_element_by_id get_elements_by_tagname html_dump_mem xinclude entities internal_subset name notations public_id system_id get_attribute_node get_attribute get_elements_by_tagname has_attribute remove_attribute set_attribute tagname add_namespace append_child append_sibling attributes child_nodes clone_node dump_node first_child get_content has_attributes has_child_nodes insert_before is_blank_node last_child next_sibling node_name node_type node_value owner_document parent_node prefix previous_sibling remove_child replace_child replace_node set_content set_name set_namespace unlink_node data target process result_dump_file result_dump_mem contained
1720 syn keyword phpFunctions dotnet_load contained
1721 syn keyword phpFunctions debug_backtrace debug_print_backtrace error_log error_reporting restore_error_handler set_error_handler trigger_error user_error contained
1722 syn keyword phpFunctions escapeshellarg escapeshellcmd exec passthru proc_close proc_get_status proc_nice proc_open proc_terminate shell_exec system contained
1723 syn keyword phpFunctions fam_cancel_monitor fam_close fam_monitor_collection fam_monitor_directory fam_monitor_file fam_next_event fam_open fam_pending fam_resume_monitor fam_suspend_monitor contained
1724 syn keyword phpFunctions fbsql_affected_rows fbsql_autocommit fbsql_change_user fbsql_close fbsql_commit fbsql_connect fbsql_create_blob fbsql_create_clob fbsql_create_db fbsql_data_seek fbsql_database_password fbsql_database fbsql_db_query fbsql_db_status fbsql_drop_db fbsql_errno fbsql_error fbsql_fetch_array fbsql_fetch_assoc fbsql_fetch_field fbsql_fetch_lengths fbsql_fetch_object fbsql_fetch_row fbsql_field_flags fbsql_field_len fbsql_field_name fbsql_field_seek fbsql_field_table fbsql_field_type fbsql_free_result fbsql_get_autostart_info fbsql_hostname fbsql_insert_id fbsql_list_dbs fbsql_list_fields fbsql_list_tables fbsql_next_result fbsql_num_fields fbsql_num_rows fbsql_password fbsql_pconnect fbsql_query fbsql_read_blob fbsql_read_clob fbsql_result fbsql_rollback fbsql_select_db fbsql_set_lob_mode fbsql_set_transaction fbsql_start_db fbsql_stop_db fbsql_tablename fbsql_username fbsql_warnings contained
1725 syn keyword phpFunctions fdf_add_doc_javascript fdf_add_template fdf_close fdf_create fdf_enum_values fdf_errno fdf_error fdf_get_ap fdf_get_attachment fdf_get_encoding fdf_get_file fdf_get_flags fdf_get_opt fdf_get_status fdf_get_value fdf_get_version fdf_header fdf_next_field_name fdf_open_string fdf_open fdf_remove_item fdf_save_string fdf_save fdf_set_ap fdf_set_encoding fdf_set_file fdf_set_flags fdf_set_javascript_action fdf_set_opt fdf_set_status fdf_set_submit_form_action fdf_set_target_frame fdf_set_value fdf_set_version contained
1726 syn keyword phpFunctions filepro_fieldcount filepro_fieldname filepro_fieldtype filepro_fieldwidth filepro_retrieve filepro_rowcount filepro contained
1727 syn keyword phpFunctions basename chgrp chmod chown clearstatcache copy delete dirname disk_free_space disk_total_space diskfreespace fclose feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents file fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype flock fnmatch fopen fpassthru fputs fread fscanf fseek fstat ftell ftruncate fwrite glob is_dir is_executable is_file is_link is_readable is_uploaded_file is_writable is_writeable link linkinfo lstat mkdir move_uploaded_file parse_ini_file pathinfo pclose popen readfile readlink realpath rename rewind rmdir set_file_buffer stat symlink tempnam tmpfile touch umask unlink contained
1728 syn keyword phpFunctions fribidi_log2vis contained
1729 syn keyword phpFunctions ftp_alloc ftp_cdup ftp_chdir ftp_chmod ftp_close ftp_connect ftp_delete ftp_exec ftp_fget ftp_fput ftp_get_option ftp_get ftp_login ftp_mdtm ftp_mkdir ftp_nb_continue ftp_nb_fget ftp_nb_fput ftp_nb_get ftp_nb_put ftp_nlist ftp_pasv ftp_put ftp_pwd ftp_quit ftp_raw ftp_rawlist ftp_rename ftp_rmdir ftp_set_option ftp_site ftp_size ftp_ssl_connect ftp_systype contained
1730 syn keyword phpFunctions call_user_func_array call_user_func create_function func_get_arg func_get_args func_num_args function_exists get_defined_functions register_shutdown_function register_tick_function unregister_tick_function contained
1731 syn keyword phpFunctions bind_textdomain_codeset bindtextdomain dcgettext dcngettext dgettext dngettext gettext ngettext textdomain contained
1732 syn keyword phpFunctions gmp_abs gmp_add gmp_and gmp_clrbit gmp_cmp gmp_com gmp_div_q gmp_div_qr gmp_div_r gmp_div gmp_divexact gmp_fact gmp_gcd gmp_gcdext gmp_hamdist gmp_init gmp_intval gmp_invert gmp_jacobi gmp_legendre gmp_mod gmp_mul gmp_neg gmp_or gmp_perfect_square gmp_popcount gmp_pow gmp_powm gmp_prob_prime gmp_random gmp_scan0 gmp_scan1 gmp_setbit gmp_sign gmp_sqrt gmp_sqrtrem gmp_sqrtrm gmp_strval gmp_sub gmp_xor contained
1733 syn keyword phpFunctions header headers_list headers_sent setcookie contained
1734 syn keyword phpFunctions hw_api_attribute hwapi_hgcsp hw_api_content hw_api_object contained
1735 syn keyword phpMethods key langdepvalue value values checkin checkout children mimetype read content copy dbstat dcstat dstanchors dstofsrcanchors count reason find ftstat hwstat identify info insert insertanchor insertcollection insertdocument link lock move assign attreditable count insert remove title value object objectbyanchor parents description type remove replace setcommitedversion srcanchors srcsofdst unlock user userlist contained
1736 syn keyword phpFunctions hw_Array2Objrec hw_changeobject hw_Children hw_ChildrenObj hw_Close hw_Connect hw_connection_info hw_cp hw_Deleteobject hw_DocByAnchor hw_DocByAnchorObj hw_Document_Attributes hw_Document_BodyTag hw_Document_Content hw_Document_SetContent hw_Document_Size hw_dummy hw_EditText hw_Error hw_ErrorMsg hw_Free_Document hw_GetAnchors hw_GetAnchorsObj hw_GetAndLock hw_GetChildColl hw_GetChildCollObj hw_GetChildDocColl hw_GetChildDocCollObj hw_GetObject hw_GetObjectByQuery hw_GetObjectByQueryColl hw_GetObjectByQueryCollObj hw_GetObjectByQueryObj hw_GetParents hw_GetParentsObj hw_getrellink hw_GetRemote hw_getremotechildren hw_GetSrcByDestObj hw_GetText hw_getusername hw_Identify hw_InCollections hw_Info hw_InsColl hw_InsDoc hw_insertanchors hw_InsertDocument hw_InsertObject hw_mapid hw_Modifyobject hw_mv hw_New_Document hw_objrec2array hw_Output_Document hw_pConnect hw_PipeDocument hw_Root hw_setlinkroot hw_stat hw_Unlock hw_Who contained
1737 syn keyword phpFunctions ibase_add_user ibase_affected_rows ibase_blob_add ibase_blob_cancel ibase_blob_close ibase_blob_create ibase_blob_echo ibase_blob_get ibase_blob_import ibase_blob_info ibase_blob_open ibase_close ibase_commit_ret ibase_commit ibase_connect ibase_delete_user ibase_drop_db ibase_errcode ibase_errmsg ibase_execute ibase_fetch_assoc ibase_fetch_object ibase_fetch_row ibase_field_info ibase_free_event_handler ibase_free_query ibase_free_result ibase_gen_id ibase_modify_user ibase_name_result ibase_num_fields ibase_num_params ibase_param_info ibase_pconnect ibase_prepare ibase_query ibase_rollback_ret ibase_rollback ibase_set_event_handler ibase_timefmt ibase_trans ibase_wait_event contained
1738 syn keyword phpFunctions iconv_get_encoding iconv_mime_decode_headers iconv_mime_decode iconv_mime_encode iconv_set_encoding iconv_strlen iconv_strpos iconv_strrpos iconv_substr iconv ob_iconv_handler contained
1739 syn keyword phpFunctions ifx_affected_rows ifx_blobinfile_mode ifx_byteasvarchar ifx_close ifx_connect ifx_copy_blob ifx_create_blob ifx_create_char ifx_do ifx_error ifx_errormsg ifx_fetch_row ifx_fieldproperties ifx_fieldtypes ifx_free_blob ifx_free_char ifx_free_result ifx_get_blob ifx_get_char ifx_getsqlca ifx_htmltbl_result ifx_nullformat ifx_num_fields ifx_num_rows ifx_pconnect ifx_prepare ifx_query ifx_textasvarchar ifx_update_blob ifx_update_char ifxus_close_slob ifxus_create_slob ifxus_free_slob ifxus_open_slob ifxus_read_slob ifxus_seek_slob ifxus_tell_slob ifxus_write_slob contained
1740 syn keyword phpFunctions exif_imagetype exif_read_data exif_thumbnail gd_info getimagesize image_type_to_mime_type image2wbmp imagealphablending imageantialias imagearc imagechar imagecharup imagecolorallocate imagecolorallocatealpha imagecolorat imagecolorclosest imagecolorclosestalpha imagecolorclosesthwb imagecolordeallocate imagecolorexact imagecolorexactalpha imagecolormatch imagecolorresolve imagecolorresolvealpha imagecolorset imagecolorsforindex imagecolorstotal imagecolortransparent imagecopy imagecopymerge imagecopymergegray imagecopyresampled imagecopyresized imagecreate imagecreatefromgd2 imagecreatefromgd2part imagecreatefromgd imagecreatefromgif imagecreatefromjpeg imagecreatefrompng imagecreatefromstring imagecreatefromwbmp imagecreatefromxbm imagecreatefromxpm imagecreatetruecolor imagedashedline imagedestroy imageellipse imagefill imagefilledarc imagefilledellipse imagefilledpolygon imagefilledrectangle imagefilltoborder imagefontheight imagefontwidth imageftbbox imagefttext imagegammacorrect imagegd2 imagegd imagegif imageinterlace imageistruecolor imagejpeg imageline imageloadfont imagepalettecopy imagepng imagepolygon imagepsbbox imagepscopyfont imagepsencodefont imagepsextendfont imagepsfreefont imagepsloadfont imagepsslantfont imagepstext imagerectangle imagerotate imagesavealpha imagesetbrush imagesetpixel imagesetstyle imagesetthickness imagesettile imagestring imagestringup imagesx imagesy imagetruecolortopalette imagettfbbox imagettftext imagetypes imagewbmp iptcembed iptcparse jpeg2wbmp png2wbmp read_exif_data contained
1741 syn keyword phpFunctions imap_8bit imap_alerts imap_append imap_base64 imap_binary imap_body imap_bodystruct imap_check imap_clearflag_full imap_close imap_createmailbox imap_delete imap_deletemailbox imap_errors imap_expunge imap_fetch_overview imap_fetchbody imap_fetchheader imap_fetchstructure imap_get_quota imap_get_quotaroot imap_getacl imap_getmailboxes imap_getsubscribed imap_header imap_headerinfo imap_headers imap_last_error imap_list imap_listmailbox imap_listscan imap_listsubscribed imap_lsub imap_mail_compose imap_mail_copy imap_mail_move imap_mail imap_mailboxmsginfo imap_mime_header_decode imap_msgno imap_num_msg imap_num_recent imap_open imap_ping imap_qprint imap_renamemailbox imap_reopen imap_rfc822_parse_adrlist imap_rfc822_parse_headers imap_rfc822_write_address imap_scanmailbox imap_search imap_set_quota imap_setacl imap_setflag_full imap_sort imap_status imap_subscribe imap_thread imap_timeout imap_uid imap_undelete imap_unsubscribe imap_utf7_decode imap_utf7_encode imap_utf8 contained
1742 syn keyword phpFunctions assert_options assert dl extension_loaded get_cfg_var get_current_user get_defined_constants get_extension_funcs get_include_path get_included_files get_loaded_extensions get_magic_quotes_gpc get_magic_quotes_runtime get_required_files getenv getlastmod getmygid getmyinode getmypid getmyuid getopt getrusage ini_alter ini_get_all ini_get ini_restore ini_set main memory_get_usage php_ini_scanned_files php_logo_guid php_sapi_name php_uname phpcredits phpinfo phpversion putenv restore_include_path set_include_path set_magic_quotes_runtime set_time_limit version_compare zend_logo_guid zend_version contained
1743 syn keyword phpFunctions ingres_autocommit ingres_close ingres_commit ingres_connect ingres_fetch_array ingres_fetch_object ingres_fetch_row ingres_field_length ingres_field_name ingres_field_nullable ingres_field_precision ingres_field_scale ingres_field_type ingres_num_fields ingres_num_rows ingres_pconnect ingres_query ingres_rollback contained
1744 syn keyword phpFunctions ircg_channel_mode ircg_disconnect ircg_fetch_error_msg ircg_get_username ircg_html_encode ircg_ignore_add ircg_ignore_del ircg_is_conn_alive ircg_join ircg_kick ircg_lookup_format_messages ircg_msg ircg_nick ircg_nickname_escape ircg_nickname_unescape ircg_notice ircg_part ircg_pconnect ircg_register_format_messages ircg_set_current ircg_set_file ircg_set_on_die ircg_topic ircg_whois contained
1745 syn keyword phpFunctions java_last_exception_clear java_last_exception_get contained
1746 syn keyword phpFunctions ldap_8859_to_t61 ldap_add ldap_bind ldap_close ldap_compare ldap_connect ldap_count_entries ldap_delete ldap_dn2ufn ldap_err2str ldap_errno ldap_error ldap_explode_dn ldap_first_attribute ldap_first_entry ldap_first_reference ldap_free_result ldap_get_attributes ldap_get_dn ldap_get_entries ldap_get_option ldap_get_values_len ldap_get_values ldap_list ldap_mod_add ldap_mod_del ldap_mod_replace ldap_modify ldap_next_attribute ldap_next_entry ldap_next_reference ldap_parse_reference ldap_parse_result ldap_read ldap_rename ldap_search ldap_set_option ldap_set_rebind_proc ldap_sort ldap_start_tls ldap_t61_to_8859 ldap_unbind contained
1747 syn keyword phpFunctions lzf_compress lzf_decompress lzf_optimized_for contained
1748 syn keyword phpFunctions ezmlm_hash mail contained
1749 syn keyword phpFunctions mailparse_determine_best_xfer_encoding mailparse_msg_create mailparse_msg_extract_part_file mailparse_msg_extract_part mailparse_msg_free mailparse_msg_get_part_data mailparse_msg_get_part mailparse_msg_get_structure mailparse_msg_parse_file mailparse_msg_parse mailparse_rfc822_parse_addresses mailparse_stream_encode mailparse_uudecode_all contained
1750 syn keyword phpFunctions abs acos acosh asin asinh atan2 atan atanh base_convert bindec ceil cos cosh decbin dechex decoct deg2rad exp expm1 floor fmod getrandmax hexdec hypot is_finite is_infinite is_nan lcg_value log10 log1p log max min mt_getrandmax mt_rand mt_srand octdec pi pow rad2deg rand round sin sinh sqrt srand tan tanh contained
1751 syn keyword phpFunctions mb_convert_case mb_convert_encoding mb_convert_kana mb_convert_variables mb_decode_mimeheader mb_decode_numericentity mb_detect_encoding mb_detect_order mb_encode_mimeheader mb_encode_numericentity mb_ereg_match mb_ereg_replace mb_ereg_search_getpos mb_ereg_search_getregs mb_ereg_search_init mb_ereg_search_pos mb_ereg_search_regs mb_ereg_search_setpos mb_ereg_search mb_ereg mb_eregi_replace mb_eregi mb_get_info mb_http_input mb_http_output mb_internal_encoding mb_language mb_output_handler mb_parse_str mb_preferred_mime_name mb_regex_encoding mb_regex_set_options mb_send_mail mb_split mb_strcut mb_strimwidth mb_strlen mb_strpos mb_strrpos mb_strtolower mb_strtoupper mb_strwidth mb_substitute_character mb_substr_count mb_substr contained
1752 syn keyword phpFunctions mcal_append_event mcal_close mcal_create_calendar mcal_date_compare mcal_date_valid mcal_day_of_week mcal_day_of_year mcal_days_in_month mcal_delete_calendar mcal_delete_event mcal_event_add_attribute mcal_event_init mcal_event_set_alarm mcal_event_set_category mcal_event_set_class mcal_event_set_description mcal_event_set_end mcal_event_set_recur_daily mcal_event_set_recur_monthly_mday mcal_event_set_recur_monthly_wday mcal_event_set_recur_none mcal_event_set_recur_weekly mcal_event_set_recur_yearly mcal_event_set_start mcal_event_set_title mcal_expunge mcal_fetch_current_stream_event mcal_fetch_event mcal_is_leap_year mcal_list_alarms mcal_list_events mcal_next_recurrence mcal_open mcal_popen mcal_rename_calendar mcal_reopen mcal_snooze mcal_store_event mcal_time_valid mcal_week_of_year contained
1753 syn keyword phpFunctions mcrypt_cbc mcrypt_cfb mcrypt_create_iv mcrypt_decrypt mcrypt_ecb mcrypt_enc_get_algorithms_name mcrypt_enc_get_block_size mcrypt_enc_get_iv_size mcrypt_enc_get_key_size mcrypt_enc_get_modes_name mcrypt_enc_get_supported_key_sizes mcrypt_enc_is_block_algorithm_mode mcrypt_enc_is_block_algorithm mcrypt_enc_is_block_mode mcrypt_enc_self_test mcrypt_encrypt mcrypt_generic_deinit mcrypt_generic_end mcrypt_generic_init mcrypt_generic mcrypt_get_block_size mcrypt_get_cipher_name mcrypt_get_iv_size mcrypt_get_key_size mcrypt_list_algorithms mcrypt_list_modes mcrypt_module_close mcrypt_module_get_algo_block_size mcrypt_module_get_algo_key_size mcrypt_module_get_supported_key_sizes mcrypt_module_is_block_algorithm_mode mcrypt_module_is_block_algorithm mcrypt_module_is_block_mode mcrypt_module_open mcrypt_module_self_test mcrypt_ofb mdecrypt_generic contained
1754 syn keyword phpFunctions mcve_adduser mcve_adduserarg mcve_bt mcve_checkstatus mcve_chkpwd mcve_chngpwd mcve_completeauthorizations mcve_connect mcve_connectionerror mcve_deleteresponse mcve_deletetrans mcve_deleteusersetup mcve_deluser mcve_destroyconn mcve_destroyengine mcve_disableuser mcve_edituser mcve_enableuser mcve_force mcve_getcell mcve_getcellbynum mcve_getcommadelimited mcve_getheader mcve_getuserarg mcve_getuserparam mcve_gft mcve_gl mcve_gut mcve_initconn mcve_initengine mcve_initusersetup mcve_iscommadelimited mcve_liststats mcve_listusers mcve_maxconntimeout mcve_monitor mcve_numcolumns mcve_numrows mcve_override mcve_parsecommadelimited mcve_ping mcve_preauth mcve_preauthcompletion mcve_qc mcve_responseparam mcve_return mcve_returncode mcve_returnstatus mcve_sale mcve_setblocking mcve_setdropfile mcve_setip mcve_setssl_files mcve_setssl mcve_settimeout mcve_settle mcve_text_avs mcve_text_code mcve_text_cv mcve_transactionauth mcve_transactionavs mcve_transactionbatch mcve_transactioncv mcve_transactionid mcve_transactionitem mcve_transactionssent mcve_transactiontext mcve_transinqueue mcve_transnew mcve_transparam mcve_transsend mcve_ub mcve_uwait mcve_verifyconnection mcve_verifysslcert mcve_void contained
1755 syn keyword phpFunctions mhash_count mhash_get_block_size mhash_get_hash_name mhash_keygen_s2k mhash contained
1756 syn keyword phpFunctions mime_content_type contained
1757 syn keyword phpFunctions ming_setcubicthreshold ming_setscale ming_useswfversion SWFAction SWFBitmap swfbutton_keypress SWFbutton SWFDisplayItem SWFFill SWFFont SWFGradient SWFMorph SWFMovie SWFShape SWFSprite SWFText SWFTextField contained
1758 syn keyword phpMethods getHeight getWidth addAction addShape setAction setdown setHit setOver setUp addColor move moveTo multColor remove Rotate rotateTo scale scaleTo setDepth setName setRatio skewX skewXTo skewY skewYTo moveTo rotateTo scaleTo skewXTo skewYTo getwidth addEntry getshape1 getshape2 add nextframe output remove save setbackground setdimension setframes setrate streammp3 addFill drawCurve drawCurveTo drawLine drawLineTo movePen movePenTo setLeftFill setLine setRightFill add nextframe remove setframes addString getWidth moveTo setColor setFont setHeight setSpacing addstring align setbounds setcolor setFont setHeight setindentation setLeftMargin setLineSpacing setMargins setname setrightMargin contained
1759 syn keyword phpFunctions connection_aborted connection_status connection_timeout constant define defined eval get_browser highlight_file highlight_string ignore_user_abort pack show_source sleep uniqid unpack usleep contained
1760 syn keyword phpFunctions udm_add_search_limit udm_alloc_agent udm_api_version udm_cat_list udm_cat_path udm_check_charset udm_check_stored udm_clear_search_limits udm_close_stored udm_crc32 udm_errno udm_error udm_find udm_free_agent udm_free_ispell_data udm_free_res udm_get_doc_count udm_get_res_field udm_get_res_param udm_load_ispell_data udm_open_stored udm_set_agent_param contained
1761 syn keyword phpFunctions msession_connect msession_count msession_create msession_destroy msession_disconnect msession_find msession_get_array msession_get msession_getdata msession_inc msession_list msession_listvar msession_lock msession_plugin msession_randstr msession_set_array msession_set msession_setdata msession_timeout msession_uniq msession_unlock contained
1762 syn keyword phpFunctions msql_affected_rows msql_close msql_connect msql_create_db msql_createdb msql_data_seek msql_dbname msql_drop_db msql_dropdb msql_error msql_fetch_array msql_fetch_field msql_fetch_object msql_fetch_row msql_field_seek msql_fieldflags msql_fieldlen msql_fieldname msql_fieldtable msql_fieldtype msql_free_result msql_freeresult msql_list_dbs msql_list_fields msql_list_tables msql_listdbs msql_listfields msql_listtables msql_num_fields msql_num_rows msql_numfields msql_numrows msql_pconnect msql_query msql_regcase msql_result msql_select_db msql_selectdb msql_tablename msql contained
1763 syn keyword phpFunctions mssql_bind mssql_close mssql_connect mssql_data_seek mssql_execute mssql_fetch_array mssql_fetch_assoc mssql_fetch_batch mssql_fetch_field mssql_fetch_object mssql_fetch_row mssql_field_length mssql_field_name mssql_field_seek mssql_field_type mssql_free_result mssql_free_statement mssql_get_last_message mssql_guid_string mssql_init mssql_min_error_severity mssql_min_message_severity mssql_next_result mssql_num_fields mssql_num_rows mssql_pconnect mssql_query mssql_result mssql_rows_affected mssql_select_db contained
1764 syn keyword phpFunctions muscat_close muscat_get muscat_give muscat_setup_net muscat_setup contained
1765 syn keyword phpFunctions mysql_affected_rows mysql_change_user mysql_client_encoding mysql_close mysql_connect mysql_create_db mysql_data_seek mysql_db_name mysql_db_query mysql_drop_db mysql_errno mysql_error mysql_escape_string mysql_fetch_array mysql_fetch_assoc mysql_fetch_field mysql_fetch_lengths mysql_fetch_object mysql_fetch_row mysql_field_flags mysql_field_len mysql_field_name mysql_field_seek mysql_field_table mysql_field_type mysql_free_result mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql_insert_id mysql_list_dbs mysql_list_fields mysql_list_processes mysql_list_tables mysql_num_fields mysql_num_rows mysql_pconnect mysql_ping mysql_query mysql_real_escape_string mysql_result mysql_select_db mysql_stat mysql_tablename mysql_thread_id mysql_unbuffered_query contained
1766 syn keyword phpFunctions mysqli_affected_rows mysqli_autocommit mysqli_bind_param mysqli_bind_result mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect mysqli_data_seek mysqli_debug mysqli_disable_reads_from_master mysqli_disable_rpl_parse mysqli_dump_debug_info mysqli_enable_reads_from_master mysqli_enable_rpl_parse mysqli_errno mysqli_error mysqli_execute mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_fetch mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_client_info mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_master_query mysqli_num_fields mysqli_num_rows mysqli_options mysqli_param_count mysqli_ping mysqli_prepare_result mysqli_prepare mysqli_profiler mysqli_query mysqli_read_query_result mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reload mysqli_rollback mysqli_rpl_parse_enabled mysqli_rpl_probe mysqli_rpl_query_type mysqli_select_db mysqli_send_long_data mysqli_send_query mysqli_slave_query mysqli_ssl_set mysqli_stat mysqli_stmt_affected_rows mysqli_stmt_close mysqli_stmt_errno mysqli_stmt_error mysqli_stmt_store_result mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count contained
1767 syn keyword phpFunctions ncurses_addch ncurses_addchnstr ncurses_addchstr ncurses_addnstr ncurses_addstr ncurses_assume_default_colors ncurses_attroff ncurses_attron ncurses_attrset ncurses_baudrate ncurses_beep ncurses_bkgd ncurses_bkgdset ncurses_border ncurses_bottom_panel ncurses_can_change_color ncurses_cbreak ncurses_clear ncurses_clrtobot ncurses_clrtoeol ncurses_color_content ncurses_color_set ncurses_curs_set ncurses_def_prog_mode ncurses_def_shell_mode ncurses_define_key ncurses_del_panel ncurses_delay_output ncurses_delch ncurses_deleteln ncurses_delwin ncurses_doupdate ncurses_echo ncurses_echochar ncurses_end ncurses_erase ncurses_erasechar ncurses_filter ncurses_flash ncurses_flushinp ncurses_getch ncurses_getmaxyx ncurses_getmouse ncurses_getyx ncurses_halfdelay ncurses_has_colors ncurses_has_ic ncurses_has_il ncurses_has_key ncurses_hide_panel ncurses_hline ncurses_inch ncurses_init_color ncurses_init_pair ncurses_init ncurses_insch ncurses_insdelln ncurses_insertln ncurses_insstr ncurses_instr ncurses_isendwin ncurses_keyok ncurses_keypad ncurses_killchar ncurses_longname ncurses_meta ncurses_mouse_trafo ncurses_mouseinterval ncurses_mousemask ncurses_move_panel ncurses_move ncurses_mvaddch ncurses_mvaddchnstr ncurses_mvaddchstr ncurses_mvaddnstr ncurses_mvaddstr ncurses_mvcur ncurses_mvdelch ncurses_mvgetch ncurses_mvhline ncurses_mvinch ncurses_mvvline ncurses_mvwaddstr ncurses_napms ncurses_new_panel ncurses_newpad ncurses_newwin ncurses_nl ncurses_nocbreak ncurses_noecho ncurses_nonl ncurses_noqiflush ncurses_noraw ncurses_pair_content ncurses_panel_above ncurses_panel_below ncurses_panel_window ncurses_pnoutrefresh ncurses_prefresh ncurses_putp ncurses_qiflush ncurses_raw ncurses_refresh ncurses_replace_panel ncurses_reset_prog_mode ncurses_reset_shell_mode ncurses_resetty ncurses_savetty ncurses_scr_dump ncurses_scr_init ncurses_scr_restore ncurses_scr_set ncurses_scrl ncurses_show_panel ncurses_slk_attr ncurses_slk_attroff ncurses_slk_attron ncurses_slk_attrset ncurses_slk_clear ncurses_slk_color ncurses_slk_init ncurses_slk_noutrefresh ncurses_slk_refresh ncurses_slk_restore ncurses_slk_set ncurses_slk_touch ncurses_standend ncurses_standout ncurses_start_color ncurses_termattrs ncurses_termname ncurses_timeout ncurses_top_panel ncurses_typeahead ncurses_ungetch ncurses_ungetmouse ncurses_update_panels ncurses_use_default_colors ncurses_use_env ncurses_use_extended_names ncurses_vidattr ncurses_vline ncurses_waddch ncurses_waddstr ncurses_wattroff ncurses_wattron ncurses_wattrset ncurses_wborder ncurses_wclear ncurses_wcolor_set ncurses_werase ncurses_wgetch ncurses_whline ncurses_wmouse_trafo ncurses_wmove ncurses_wnoutrefresh ncurses_wrefresh ncurses_wstandend ncurses_wstandout ncurses_wvline contained
1768 syn keyword phpFunctions checkdnsrr closelog debugger_off debugger_on define_syslog_variables dns_check_record dns_get_mx dns_get_record fsockopen gethostbyaddr gethostbyname gethostbynamel getmxrr getprotobyname getprotobynumber getservbyname getservbyport ip2long long2ip openlog pfsockopen socket_get_status socket_set_blocking socket_set_timeout syslog contained
1769 syn keyword phpFunctions yp_all yp_cat yp_err_string yp_errno yp_first yp_get_default_domain yp_master yp_match yp_next yp_order contained
1770 syn keyword phpFunctions notes_body notes_copy_db notes_create_db notes_create_note notes_drop_db notes_find_note notes_header_info notes_list_msgs notes_mark_read notes_mark_unread notes_nav_create notes_search notes_unread notes_version contained
1771 syn keyword phpFunctions nsapi_request_headers nsapi_response_headers nsapi_virtual contained
1772 syn keyword phpFunctions aggregate_info aggregate_methods_by_list aggregate_methods_by_regexp aggregate_methods aggregate_properties_by_list aggregate_properties_by_regexp aggregate_properties aggregate aggregation_info deaggregate contained
1773 syn keyword phpFunctions ocibindbyname ocicancel ocicloselob ocicollappend ocicollassign ocicollassignelem ocicollgetelem ocicollmax ocicollsize ocicolltrim ocicolumnisnull ocicolumnname ocicolumnprecision ocicolumnscale ocicolumnsize ocicolumntype ocicolumntyperaw ocicommit ocidefinebyname ocierror ociexecute ocifetch ocifetchinto ocifetchstatement ocifreecollection ocifreecursor ocifreedesc ocifreestatement ociinternaldebug ociloadlob ocilogoff ocilogon ocinewcollection ocinewcursor ocinewdescriptor ocinlogon ocinumcols ociparse ociplogon ociresult ocirollback ocirowcount ocisavelob ocisavelobfile ociserverversion ocisetprefetch ocistatementtype ociwritelobtofile ociwritetemporarylob contained
1774 syn keyword phpFunctions odbc_autocommit odbc_binmode odbc_close_all odbc_close odbc_columnprivileges odbc_columns odbc_commit odbc_connect odbc_cursor odbc_data_source odbc_do odbc_error odbc_errormsg odbc_exec odbc_execute odbc_fetch_array odbc_fetch_into odbc_fetch_object odbc_fetch_row odbc_field_len odbc_field_name odbc_field_num odbc_field_precision odbc_field_scale odbc_field_type odbc_foreignkeys odbc_free_result odbc_gettypeinfo odbc_longreadlen odbc_next_result odbc_num_fields odbc_num_rows odbc_pconnect odbc_prepare odbc_primarykeys odbc_procedurecolumns odbc_procedures odbc_result_all odbc_result odbc_rollback odbc_setoption odbc_specialcolumns odbc_statistics odbc_tableprivileges odbc_tables contained
1775 syn keyword phpFunctions openssl_csr_export_to_file openssl_csr_export openssl_csr_new openssl_csr_sign openssl_error_string openssl_free_key openssl_get_privatekey openssl_get_publickey openssl_open openssl_pkcs7_decrypt openssl_pkcs7_encrypt openssl_pkcs7_sign openssl_pkcs7_verify openssl_pkey_export_to_file openssl_pkey_export openssl_pkey_get_private openssl_pkey_get_public openssl_pkey_new openssl_private_decrypt openssl_private_encrypt openssl_public_decrypt openssl_public_encrypt openssl_seal openssl_sign openssl_verify openssl_x509_check_private_key openssl_x509_checkpurpose openssl_x509_export_to_file openssl_x509_export openssl_x509_free openssl_x509_parse openssl_x509_read contained
1776 syn keyword phpFunctions ora_bind ora_close ora_columnname ora_columnsize ora_columntype ora_commit ora_commitoff ora_commiton ora_do ora_error ora_errorcode ora_exec ora_fetch_into ora_fetch ora_getcolumn ora_logoff ora_logon ora_numcols ora_numrows ora_open ora_parse ora_plogon ora_rollback contained
1777 syn keyword phpFunctions flush ob_clean ob_end_clean ob_end_flush ob_flush ob_get_clean ob_get_contents ob_get_flush ob_get_length ob_get_level ob_get_status ob_gzhandler ob_implicit_flush ob_list_handlers ob_start output_add_rewrite_var output_reset_rewrite_vars contained
1778 syn keyword phpFunctions overload contained
1779 syn keyword phpFunctions ovrimos_close ovrimos_commit ovrimos_connect ovrimos_cursor ovrimos_exec ovrimos_execute ovrimos_fetch_into ovrimos_fetch_row ovrimos_field_len ovrimos_field_name ovrimos_field_num ovrimos_field_type ovrimos_free_result ovrimos_longreadlen ovrimos_num_fields ovrimos_num_rows ovrimos_prepare ovrimos_result_all ovrimos_result ovrimos_rollback contained
1780 syn keyword phpFunctions pcntl_exec pcntl_fork pcntl_signal pcntl_waitpid pcntl_wexitstatus pcntl_wifexited pcntl_wifsignaled pcntl_wifstopped pcntl_wstopsig pcntl_wtermsig contained
1781 syn keyword phpFunctions preg_grep preg_match_all preg_match preg_quote preg_replace_callback preg_replace preg_split contained
1782 syn keyword phpFunctions pdf_add_annotation pdf_add_bookmark pdf_add_launchlink pdf_add_locallink pdf_add_note pdf_add_outline pdf_add_pdflink pdf_add_thumbnail pdf_add_weblink pdf_arc pdf_arcn pdf_attach_file pdf_begin_page pdf_begin_pattern pdf_begin_template pdf_circle pdf_clip pdf_close_image pdf_close_pdi_page pdf_close_pdi pdf_close pdf_closepath_fill_stroke pdf_closepath_stroke pdf_closepath pdf_concat pdf_continue_text pdf_curveto pdf_delete pdf_end_page pdf_end_pattern pdf_end_template pdf_endpath pdf_fill_stroke pdf_fill pdf_findfont pdf_get_buffer pdf_get_font pdf_get_fontname pdf_get_fontsize pdf_get_image_height pdf_get_image_width pdf_get_majorversion pdf_get_minorversion pdf_get_parameter pdf_get_pdi_parameter pdf_get_pdi_value pdf_get_value pdf_initgraphics pdf_lineto pdf_makespotcolor pdf_moveto pdf_new pdf_open_CCITT pdf_open_file pdf_open_gif pdf_open_image_file pdf_open_image pdf_open_jpeg pdf_open_memory_image pdf_open_pdi_page pdf_open_pdi pdf_open_png pdf_open_tiff pdf_open pdf_place_image pdf_place_pdi_page pdf_rect pdf_restore pdf_rotate pdf_save pdf_scale pdf_set_border_color pdf_set_border_dash pdf_set_border_style pdf_set_char_spacing pdf_set_duration pdf_set_font pdf_set_horiz_scaling pdf_set_info_author pdf_set_info_creator pdf_set_info_keywords pdf_set_info_subject pdf_set_info_title pdf_set_info pdf_set_leading pdf_set_parameter pdf_set_text_matrix pdf_set_text_pos pdf_set_text_rendering pdf_set_text_rise pdf_set_value pdf_set_word_spacing pdf_setcolor pdf_setdash pdf_setflat pdf_setfont pdf_setgray_fill pdf_setgray_stroke pdf_setgray pdf_setlinecap pdf_setlinejoin pdf_setlinewidth pdf_setmatrix pdf_setmiterlimit pdf_setpolydash pdf_setrgbcolor_fill pdf_setrgbcolor_stroke pdf_setrgbcolor pdf_show_boxed pdf_show_xy pdf_show pdf_skew pdf_stringwidth pdf_stroke pdf_translate contained
1783 syn keyword phpFunctions pfpro_cleanup pfpro_init pfpro_process_raw pfpro_process pfpro_version contained
1784 syn keyword phpFunctions pg_affected_rows pg_cancel_query pg_client_encoding pg_close pg_connect pg_connection_busy pg_connection_reset pg_connection_status pg_convert pg_copy_from pg_copy_to pg_dbname pg_delete pg_end_copy pg_escape_bytea pg_escape_string pg_fetch_all pg_fetch_array pg_fetch_assoc pg_fetch_object pg_fetch_result pg_fetch_row pg_field_is_null pg_field_name pg_field_num pg_field_prtlen pg_field_size pg_field_type pg_free_result pg_get_notify pg_get_pid pg_get_result pg_host pg_insert pg_last_error pg_last_notice pg_last_oid pg_lo_close pg_lo_create pg_lo_export pg_lo_import pg_lo_open pg_lo_read_all pg_lo_read pg_lo_seek pg_lo_tell pg_lo_unlink pg_lo_write pg_meta_data pg_num_fields pg_num_rows pg_options pg_pconnect pg_ping pg_port pg_put_line pg_query pg_result_error pg_result_seek pg_result_status pg_select pg_send_query pg_set_client_encoding pg_trace pg_tty pg_unescape_bytea pg_untrace pg_update contained
1785 syn keyword phpFunctions posix_ctermid posix_get_last_error posix_getcwd posix_getegid posix_geteuid posix_getgid posix_getgrgid posix_getgrnam posix_getgroups posix_getlogin posix_getpgid posix_getpgrp posix_getpid posix_getppid posix_getpwnam posix_getpwuid posix_getrlimit posix_getsid posix_getuid posix_isatty posix_kill posix_mkfifo posix_setegid posix_seteuid posix_setgid posix_setpgid posix_setsid posix_setuid posix_strerror posix_times posix_ttyname posix_uname contained
1786 syn keyword phpFunctions printer_abort printer_close printer_create_brush printer_create_dc printer_create_font printer_create_pen printer_delete_brush printer_delete_dc printer_delete_font printer_delete_pen printer_draw_bmp printer_draw_chord printer_draw_elipse printer_draw_line printer_draw_pie printer_draw_rectangle printer_draw_roundrect printer_draw_text printer_end_doc printer_end_page printer_get_option printer_list printer_logical_fontheight printer_open printer_select_brush printer_select_font printer_select_pen printer_set_option printer_start_doc printer_start_page printer_write contained
1787 syn keyword phpFunctions pspell_add_to_personal pspell_add_to_session pspell_check pspell_clear_session pspell_config_create pspell_config_ignore pspell_config_mode pspell_config_personal pspell_config_repl pspell_config_runtogether pspell_config_save_repl pspell_new_config pspell_new_personal pspell_new pspell_save_wordlist pspell_store_replacement pspell_suggest contained
1788 syn keyword phpFunctions qdom_error qdom_tree contained
1789 syn keyword phpFunctions readline_add_history readline_clear_history readline_completion_function readline_info readline_list_history readline_read_history readline_write_history readline contained
1790 syn keyword phpFunctions recode_file recode_string recode contained
1791 syn keyword phpFunctions ereg_replace ereg eregi_replace eregi split spliti sql_regcase contained
1792 syn keyword phpFunctions ftok msg_get_queue msg_receive msg_remove_queue msg_send msg_set_queue msg_stat_queue sem_acquire sem_get sem_release sem_remove shm_attach shm_detach shm_get_var shm_put_var shm_remove_var shm_remove contained
1793 syn keyword phpFunctions sesam_affected_rows sesam_commit sesam_connect sesam_diagnostic sesam_disconnect sesam_errormsg sesam_execimm sesam_fetch_array sesam_fetch_result sesam_fetch_row sesam_field_array sesam_field_name sesam_free_result sesam_num_fields sesam_query sesam_rollback sesam_seek_row sesam_settransaction contained
1794 syn keyword phpFunctions session_cache_expire session_cache_limiter session_decode session_destroy session_encode session_get_cookie_params session_id session_is_registered session_module_name session_name session_regenerate_id session_register session_save_path session_set_cookie_params session_set_save_handler session_start session_unregister session_unset session_write_close contained
1795 syn keyword phpFunctions shmop_close shmop_delete shmop_open shmop_read shmop_size shmop_write contained
1796 syn keyword phpFunctions snmp_get_quick_print snmp_set_quick_print snmpget snmprealwalk snmpset snmpwalk snmpwalkoid contained
1797 syn keyword phpFunctions socket_accept socket_bind socket_clear_error socket_close socket_connect socket_create_listen socket_create_pair socket_create socket_get_option socket_getpeername socket_getsockname socket_iovec_add socket_iovec_alloc socket_iovec_delete socket_iovec_fetch socket_iovec_free socket_iovec_set socket_last_error socket_listen socket_read socket_readv socket_recv socket_recvfrom socket_recvmsg socket_select socket_send socket_sendmsg socket_sendto socket_set_block socket_set_nonblock socket_set_option socket_shutdown socket_strerror socket_write socket_writev contained
1798 syn keyword phpFunctions sqlite_array_query sqlite_busy_timeout sqlite_changes sqlite_close sqlite_column sqlite_create_aggregate sqlite_create_function sqlite_current sqlite_error_string sqlite_escape_string sqlite_fetch_array sqlite_fetch_single sqlite_fetch_string sqlite_field_name sqlite_has_more sqlite_last_error sqlite_last_insert_rowid sqlite_libencoding sqlite_libversion sqlite_next sqlite_num_fields sqlite_num_rows sqlite_open sqlite_popen sqlite_query sqlite_rewind sqlite_seek sqlite_udf_decode_binary sqlite_udf_encode_binary sqlite_unbuffered_query contained
1799 syn keyword phpFunctions stream_context_create stream_context_get_options stream_context_set_option stream_context_set_params stream_copy_to_stream stream_filter_append stream_filter_prepend stream_filter_register stream_get_contents stream_get_filters stream_get_line stream_get_meta_data stream_get_transports stream_get_wrappers stream_register_wrapper stream_select stream_set_blocking stream_set_timeout stream_set_write_buffer stream_socket_accept stream_socket_client stream_socket_get_name stream_socket_recvfrom stream_socket_sendto stream_socket_server stream_wrapper_register contained
e132c7b2 1800 syn keyword phpFunctions addcslashes addslashes bin2hex chop chr chunk_split convert_cyr_string count_chars crc32 crypt explode fprintf get_html_translation_table hebrev hebrevc html_entity_decode htmlentities htmlspecialchars implode join levenshtein localeconv ltrim md5_file md5 metaphone money_format nl_langinfo nl2br number_format ord parse_str print printf quoted_printable_decode quotemeta rtrim setlocale sha1_file sha1 similar_text soundex sprintf sscanf str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split str_word_count strcasecmp strchr strcmp strcoll strcspn strip_tags stripcslashes stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpos strrchr strrev strripos strrpos strspn strstr strtok strtolower strtoupper strtr substr_compare substr_count substr_replace substr trim ucfirst ucwords vprintf vfprintf vsprintf wordwrap contained
d99475eb
ER
1801 syn keyword phpFunctions swf_actiongeturl swf_actiongotoframe swf_actiongotolabel swf_actionnextframe swf_actionplay swf_actionprevframe swf_actionsettarget swf_actionstop swf_actiontogglequality swf_actionwaitforframe swf_addbuttonrecord swf_addcolor swf_closefile swf_definebitmap swf_definefont swf_defineline swf_definepoly swf_definerect swf_definetext swf_endbutton swf_enddoaction swf_endshape swf_endsymbol swf_fontsize swf_fontslant swf_fonttracking swf_getbitmapinfo swf_getfontinfo swf_getframe swf_labelframe swf_lookat swf_modifyobject swf_mulcolor swf_nextid swf_oncondition swf_openfile swf_ortho2 swf_ortho swf_perspective swf_placeobject swf_polarview swf_popmatrix swf_posround swf_pushmatrix swf_removeobject swf_rotate swf_scale swf_setfont swf_setframe swf_shapearc swf_shapecurveto3 swf_shapecurveto swf_shapefillbitmapclip swf_shapefillbitmaptile swf_shapefilloff swf_shapefillsolid swf_shapelinesolid swf_shapelineto swf_shapemoveto swf_showframe swf_startbutton swf_startdoaction swf_startshape swf_startsymbol swf_textwidth swf_translate swf_viewport contained
1802 syn keyword phpFunctions sybase_affected_rows sybase_close sybase_connect sybase_data_seek sybase_deadlock_retry_count sybase_fetch_array sybase_fetch_assoc sybase_fetch_field sybase_fetch_object sybase_fetch_row sybase_field_seek sybase_free_result sybase_get_last_message sybase_min_client_severity sybase_min_error_severity sybase_min_message_severity sybase_min_server_severity sybase_num_fields sybase_num_rows sybase_pconnect sybase_query sybase_result sybase_select_db sybase_set_message_handler sybase_unbuffered_query contained
1803 syn keyword phpFunctions tidy_access_count tidy_clean_repair tidy_config_count tidy_diagnose tidy_error_count tidy_get_body tidy_get_config tidy_get_error_buffer tidy_get_head tidy_get_html_ver tidy_get_html tidy_get_output tidy_get_release tidy_get_root tidy_get_status tidy_getopt tidy_is_xhtml tidy_load_config tidy_parse_file tidy_parse_string tidy_repair_file tidy_repair_string tidy_reset_config tidy_save_config tidy_set_encoding tidy_setopt tidy_warning_count contained
1804 syn keyword phpMethods attributes children get_attr get_nodes has_children has_siblings is_asp is_comment is_html is_jsp is_jste is_text is_xhtml is_xml next prev tidy_node contained
1805 syn keyword phpFunctions token_get_all token_name contained
1806 syn keyword phpFunctions base64_decode base64_encode get_meta_tags http_build_query parse_url rawurldecode rawurlencode urldecode urlencode contained
1807 syn keyword phpFunctions doubleval empty floatval get_defined_vars get_resource_type gettype import_request_variables intval is_array is_bool is_callable is_double is_float is_int is_integer is_long is_null is_numeric is_object is_real is_resource is_scalar is_string isset print_r serialize settype strval unserialize unset var_dump var_export contained
1808 syn keyword phpFunctions vpopmail_add_alias_domain_ex vpopmail_add_alias_domain vpopmail_add_domain_ex vpopmail_add_domain vpopmail_add_user vpopmail_alias_add vpopmail_alias_del_domain vpopmail_alias_del vpopmail_alias_get_all vpopmail_alias_get vpopmail_auth_user vpopmail_del_domain_ex vpopmail_del_domain vpopmail_del_user vpopmail_error vpopmail_passwd vpopmail_set_user_quota contained
1809 syn keyword phpFunctions w32api_deftype w32api_init_dtype w32api_invoke_function w32api_register_function w32api_set_call_method contained
1810 syn keyword phpFunctions wddx_add_vars wddx_deserialize wddx_packet_end wddx_packet_start wddx_serialize_value wddx_serialize_vars contained
1811 syn keyword phpFunctions utf8_decode utf8_encode xml_error_string xml_get_current_byte_index xml_get_current_column_number xml_get_current_line_number xml_get_error_code xml_parse_into_struct xml_parse xml_parser_create_ns xml_parser_create xml_parser_free xml_parser_get_option xml_parser_set_option xml_set_character_data_handler xml_set_default_handler xml_set_element_handler xml_set_end_namespace_decl_handler xml_set_external_entity_ref_handler xml_set_notation_decl_handler xml_set_object xml_set_processing_instruction_handler xml_set_start_namespace_decl_handler xml_set_unparsed_entity_decl_handler contained
1812 syn keyword phpFunctions xmlrpc_decode_request xmlrpc_decode xmlrpc_encode_request xmlrpc_encode xmlrpc_get_type xmlrpc_parse_method_descriptions xmlrpc_server_add_introspection_data xmlrpc_server_call_method xmlrpc_server_create xmlrpc_server_destroy xmlrpc_server_register_introspection_callback xmlrpc_server_register_method xmlrpc_set_type contained
1813 syn keyword phpFunctions xslt_create xslt_errno xslt_error xslt_free xslt_output_process xslt_set_base xslt_set_encoding xslt_set_error_handler xslt_set_log xslt_set_sax_handler xslt_set_sax_handlers xslt_set_scheme_handler xslt_set_scheme_handlers contained
1814 syn keyword phpFunctions yaz_addinfo yaz_ccl_conf yaz_ccl_parse yaz_close yaz_connect yaz_database yaz_element yaz_errno yaz_error yaz_es_result yaz_get_option yaz_hits yaz_itemorder yaz_present yaz_range yaz_record yaz_scan_result yaz_scan yaz_schema yaz_search yaz_set_option yaz_sort yaz_syntax yaz_wait contained
1815 syn keyword phpFunctions zip_close zip_entry_close zip_entry_compressedsize zip_entry_compressionmethod zip_entry_filesize zip_entry_name zip_entry_open zip_entry_read zip_open zip_read contained
1816 syn keyword phpFunctions gzclose gzcompress gzdeflate gzencode gzeof gzfile gzgetc gzgets gzgetss gzinflate gzopen gzpassthru gzputs gzread gzrewind gzseek gztell gzuncompress gzwrite readgzfile zlib_get_coding_type contained
1817 syn keyword phpFunctions timezone_offset_get date_create
1818 syn keyword phpFunctions date_default_timezone_set date_default_timezone_get
1819 " ext SPL:
1820 syn keyword phpFunctions spl_autoload_call spl_autoload_extensions spl_autoload_functions
1821 syn keyword phpFunctions spl_autoload_register spl_autoload_unregister spl_autoload
1822 syn keyword phpFunctions spl_classes spl_object_hash
1823 syn keyword phpFunctions class_implements class_parents iterator_count iterator_to_array
1824
1825 " }}}2
1826
1827 if s:show_baselib
1828 syn keyword phpMethods query next_record num_rows affected_rows nf f p np num_fields haltmsg seek link_id query_id metadata table_names nextid connect halt free register unregister is_registered delete url purl self_url pself_url hidden_session add_query padd_query reimport_get_vars reimport_post_vars reimport_cookie_vars set_container set_tokenname release_token put_headers get_id get_id put_id freeze thaw gc reimport_any_vars start url purl login_if is_authenticated auth_preauth auth_loginform auth_validatelogin auth_refreshlogin auth_registerform auth_doregister start check have_perm permsum perm_invalid contained
1829 syn keyword phpFunctions page_open page_close sess_load sess_save contained
1830 endif
1831
1832
1833" }}}1
1834
1835" {{{1 REVIEW: }}}1
1836
1837
1838" Keyword
1839syn cluster phpClInClass add=phpClassDefine
1840syn keyword phpClassDefine contained var const
1841hi link phpClassDefine phpDefine
21166df1
AG
1842
1843if s:alt_arrays
d99475eb
ER
1844 syn cluster phpClExpressions add=phpArrayRegion
1845 syn cluster phpClValues add=phpArrayRegionSimple
21166df1
AG
1846 " TODO: should the error highlighting be optional???
1847 if s:fold_arrays
d99475eb
ER
1848 syn region phpArrayRegionSimple contained matchgroup=phpArrayParens start=/\<array\_s*(/ end=/)/
1849 \ keepend extend contains=@phpClValues,phpArrayPair,phpArrayComma
1850 \ matchgroup=Error end=/;/
1851 \ fold
1852 syn region phpArrayRegion contained matchgroup=phpArrayParens start=/\<array\_s*(/ end=/)/
1853 \ keepend extend contains=@phpClExpressions,phpArrayPair,phpArrayComma
21166df1
AG
1854 \ matchgroup=Error end=/;/
1855 \ fold
1856 else
d99475eb
ER
1857 syn region phpArrayRegionSimple contained matchgroup=phpArrayParens start=/\<array\_s*(/ end=/)/
1858 \ keepend extend contains=@phpClValues,phpArrayPair,phpArrayComma
1859 \ matchgroup=Error end=/;/
1860 syn region phpArrayRegion contained matchgroup=phpArrayParens start=/\<array\_s*(/ end=/)/
1861 \ keepend extend contains=@phpClExpressions,phpArrayPair,phpArrayComma
21166df1
AG
1862 \ matchgroup=Error end=/;/
1863 endif
d99475eb 1864 syn match phpArrayComma contained display /,/
21166df1 1865
d99475eb 1866 syn cluster phpClExpressions add=phpListRegion
21166df1
AG
1867 " need to make a region for the 'list' keyword as well!!!
1868 " TODO: should the error highlighting be optional???
1869 " TODO: only allow variables and stuff inside the list() construct
d99475eb
ER
1870 syn region phpListRegion contained matchgroup=phpList start=/\<list(/ end=/)/
1871 \ keepend extend contains=@phpClExpressions,phpListComma
21166df1 1872 \ matchgroup=Error end=/;/
d99475eb 1873 syn match phpListComma contained display /,/
21166df1
AG
1874else
1875 " need to use a match instead of keyword here ... to stop it
1876 " from blocking a match later on.
d99475eb
ER
1877 syn cluster phpClExpressions add=phpArray
1878 syn match phpArray contained display /\<array\>/
21166df1 1879
d99475eb 1880 syn keyword phpList contained list
21166df1
AG
1881endif
1882
d99475eb
ER
1883" Operators
1884
21166df1
AG
1885
1886" Peter Hodge - added support for array-building operator
1887" to stop the relations from mixing this up
1888if s:alt_arrays
d99475eb
ER
1889 " highlight misuse of the '=>' operator
1890 syn cluster phpClExpressions add=phpArrayPairError
21166df1 1891 syn match phpArrayPairError /=>/ contained display
d99475eb
ER
1892
1893 " the next match is used only in the correct places
1894 syn match phpArrayPair /=>/ contained display
21166df1
AG
1895else
1896 syn match phpOperator /=>/ contained display
1897endif
1898
21166df1
AG
1899" relations
1900" Peter Hodge, June 17 2006
1901" - altered relations to match strict comparisons (=== and !==)
1902" - highlight the 'instanceof' operator as a relation operator
1903" rather than a structure, if comparison support is a priority.
d99475eb
ER
1904syn cluster phpClExpressions add=phpRelation
1905syn match phpRelation contained display /===\=/
1906syn match phpRelation contained display /!==\=/
1907syn match phpRelation contained display /<<\@!=\=/
1908syn match phpRelation contained display />>\@!=\=/
21166df1 1909
d99475eb
ER
1910" 'instanceof' is also a relation, but may have alternate colours
1911syn cluster phpClExpressions add=phpInstanceof
1912syn keyword phpInstanceof contained instanceof
1913 \ nextgroup=@phpClStructures,phpStructureHere skipwhite skipempty
21166df1 1914
d99475eb 1915" how to treat '->'?
21166df1 1916
d99475eb
ER
1917" Note: this is always needed for inside strings
1918syn match phpPropertySelector contained display /->/
21166df1 1919
d99475eb
ER
1920if ! s:smart_members
1921 " NOTE: this match is for ANY '->' match, however the more specific
1922 " phpPropertySelector or phpDynamicSelector may match instead
1923 syn cluster phpClExpressions add=phpMemberSelector
1924 syn match phpMemberSelector contained display /->/
1925 \ nextgroup=@phpClProperties,@phpClMembers,phpMemberHere skipwhite skipempty
21166df1 1926
d99475eb
ER
1927else
1928 " by default all -> matches are property access
1929 syn cluster phpClExpressions add=phpPropertySelector
1930
1931 " make a match for a whole property name also
1932 syn cluster phpClExpressions add=phpPropertyAccess
1933 syn match phpPropertyAccess contained display /->\_s*\h\w*/
1934 \ contains=phpPropertySelector,@phpClProperties,phpPropertyHere
1935
1936 " try match them as method calls first though
1937 " NOTE: have taken out phpMethods (because it just wasn't accurate)
1938 " but have added phpSpecialMethods because they are always special
1939 syn cluster phpClExpressions add=phpMethodCall
1940 syn cluster phpClMethodHere add=phpMethodCall
1941 syn match phpMethodCall contained display /->\_s*\h\w*\_s*(\@=/
1942 \ contained display contains=phpMemberSelector,@phpClMethods
1943 syn match phpMethodCall contained display /->\_s*\$\h\w*\_s*(\@=/
1944 \ contained display contains=phpIdentifier,phpMemberSelector
1945 syn match phpMemberSelector contained display /->/
1946
1947 " for a dynamic {} property/method
1948 if s:alt_properties
1949 syn cluster phpClExpressions add=phpDynamicSelectorRegion
1950 syn region phpDynamicSelectorRegion contained keepend extend
1951 \ matchgroup=phpDynamicSelector start=/->\_s*{/ end=/}/
1952 \ contains=@phpClExpressions
1953 endif
21166df1 1954
d99475eb
ER
1955" " highlight incorrect use of -> as an error
1956" syn cluster phpClExpressions add=phpMemberError
1957" syn match phpMemberError /->\%#\@!\%(\_s*\)\@>[a-z{_$]\@!/ contained display
21166df1 1958
d99475eb 1959endif
21166df1 1960
d99475eb
ER
1961syn region phpIdentifierComplex contained display matchgroup=phpVarSelector start=/\${/ end=/}/
1962 \ keepend extend
1963 \ contains=@phpClExpressions
21166df1 1964
d99475eb 1965" create an identifier match for double-quoted strings:
21166df1 1966
d99475eb 1967" Methoden
21166df1 1968
d99475eb
ER
1969" Peter Hodge - added 'clone' keyword here
1970" Define
1971syn cluster phpClExpressions add=phpObjectOperator
1972syn keyword phpObjectOperator contained new
1973 \ nextgroup=@phpClClasses,@phpClInterfaces,phpStructureHere skipwhite skipempty
1974syn keyword phpObjectOperator contained clone
21166df1
AG
1975
1976" Todo
d99475eb 1977syn keyword phpTodo contained todo fixme xxx containedin=phpComment
21166df1
AG
1978
1979" Parent
1980if s:strict_blocks
d99475eb 1981 syn cluster phpClExpressions add=phpBlockRegion
21166df1 1982 if s:folding == 2
d99475eb
ER
1983 syn region phpBlockRegion matchgroup=phpBrace start=/{/ end=/}/ keepend extend
1984 \ transparent contained
1985 \ fold
21166df1 1986 else
d99475eb
ER
1987 syn region phpBlockRegion matchgroup=phpBrace start=/{/ end=/}/ keepend extend
1988 \ transparent contained
1989 if s:fold_manual
1990 syn region phpBlockRegion matchgroup=phpBrace start='{\ze\s*//\s*fold\s*$\c' end='}' keepend extend
1991 \ transparent contained
1992 \ fold
1993 endif
21166df1
AG
1994 endif
1995
1996 " parenthesis for a foreach() block, not found automatically
1997 " (is triggered by a nextgroup=phpForeachRegion)
d99475eb
ER
1998 " Note: the 'display' option on a foreach region (the part inside the '()')
1999 " would be bad, because it is possible for that to be spread over several
2000 " lines (well, I do it myself)
2001 if s:alt_arrays || s:alt_control_parents
2002 syn region phpForeachRegion matchgroup=phpControlParent start=/(/ end=/)/ keepend extend
2003 \ contained contains=@phpClExpressions,phpArrayPair
2004 \ nextgroup=phpSemicolonNotAllowedHere skipwhite skipempty
21166df1
AG
2005 endif
2006
2007 " parenthesis for a for() block, not found automatically
d99475eb
ER
2008 " (is triggered by a nextgroup=phpForRegion)
2009 if s:alt_arrays || s:alt_control_parents
2010 syn region phpForRegion matchgroup=phpControlParent
2011 \ start=/(/ end=/)/ keepend extend display
2012 \ contained contains=@phpClExpressions,phpForSemicolon
2013 \ nextgroup=phpSemicolonNotAllowedHere skipwhite skipempty
2014 syn match phpForSemicolon contained display /[,;]/
2015 hi! link phpForSemicolon phpConditional
21166df1
AG
2016 endif
2017
2018 " special parent regions for 'if/while' blocks so we can catch a semicolon
2019 " which shouldn't be at the end
d99475eb 2020 " Note: having endings on those keywords helps speed things up alot.
21166df1 2021 if s:no_empty_construct
d99475eb
ER
2022 syn region phpConstructRegion keepend extend contained contains=@phpClExpressions
2023 \ nextgroup=phpSemicolonNotAllowedHere skipwhite skipempty
2024 \ matchgroup=phpControlParent start=/(/ end=/)/
2025 \ matchgroup=Error end=/}/ end=/\]/
2026 \ end=/\$\@<!\<\%(protected\|public\|private\)\>/
2027 \ end=/\$\@<!\<\%(final\|abstract\|static\|global\)\>/
2028 \ end=/\$\@<!\<\%(class\|function\|interface\|extends\)\>/
2029 \ end=/\$\@<!\<\%(return\|break\|continue\|case\|default\|echo\)\>/
2030 syn region phpSwitchConstructRegion keepend extend contained contains=@phpClExpressions
2031 \ nextgroup=phpSemicolonNotAllowedHere,phpSwitchBlock skipwhite skipempty
2032 \ matchgroup=phpControlParent start=/(/ end=/)/
2033 \ matchgroup=Error end=/}/ end=/\]/
2034 \ end=/\$\@<!\<\%(protected\|public\|private\)\>/
2035 \ end=/\$\@<!\<\%(final\|abstract\|static\|global\)\>/
2036 \ end=/\$\@<!\<\%(class\|function\|interface\|extends\)\>/
2037 \ end=/\$\@<!\<\%(return\|break\|continue\|case\|default\|echo\)\>/
2038 syn region phpDoWhileConstructRegion keepend extend contained contains=@phpClExpressions
2039 \ matchgroup=phpControlParent start=/(/ end=/)\_s*;/
2040 \ matchgroup=Error end=/}/ end=/\]/ end=/;/
2041 \ end=/\$\@<!\<\%(protected\|public\|private\)\>/
2042 \ end=/\$\@<!\<\%(final\|abstract\|static\|global\)\>/
2043 \ end=/\$\@<!\<\%(class\|function\|interface\|extends\)\>/
2044 \ end=/\$\@<!\<\%(return\|break\|continue\|case\|default\|echo\)\>/
21166df1
AG
2045 endif
2046
2047 " match up ( and ), as well as [ and ]
d99475eb
ER
2048 syn cluster phpClExpressions add=phpParentRegion,phpBracketRegion
2049 syn region phpParentRegion contained keepend extend contains=@phpClExpressions
21166df1 2050 \ matchgroup=phpParent start=/(/ end=/)/
d99475eb
ER
2051 \ matchgroup=Error end=/;/ end=/}/ end=/\]/
2052 " NOTE: the 'dispay' option on a [] region isn't so dangerous, as they are
2053 " normally only one line
2054 " TODO: does the 'display' option break folding for php_fold_arrays? The
2055 " answer is YES
2056 syn region phpBracketRegion contained keepend extend contains=@phpClExpressions
21166df1
AG
2057 \ matchgroup=phpParent start=/\[/ end=/\]/
2058 \ matchgroup=Error end=/;/
2059
2060 " when a closing }, ) or ] is out of place ...
2061 if s:parent_error_close
d99475eb
ER
2062 syn cluster phpClValues add=phpBraceError,phpParentError
2063 syn match phpBraceError contained display /}/
21166df1
AG
2064 syn match phpParentError contained display /)/
2065 syn match phpParentError contained display /\]/
2066 endif
2067
2068else
2069 syn match phpParent contained display /{/
2070 syn match phpParent contained display /}/
2071 syn match phpParent contained display /\[/
2072 syn match phpParent contained display /\]/
2073 syn match phpParent contained display /(/
2074 syn match phpParent contained display /)/
2075endif
2076
d99475eb 2077syn cluster phpClTop add=phpFoldFunction,phpFoldClass,phpFoldInterface
21166df1
AG
2078
2079" PHP Region
2080if s:long_tags
d99475eb 2081 syn region phpRegion matchgroup=phpRegionDelimiter start=/<?php\w\@!/ end=/?>/
21166df1
AG
2082 \ keepend extend contains=@phpClTop
2083else
d99475eb 2084 syn region phpRegion matchgroup=phpRegionDelimiter start=/<?\(php\w\@!\|=\)\=/ end=/?>/
21166df1
AG
2085 \ keepend extend contains=@phpClTop
2086endif
2087
2088syn region phpRegionSc matchgroup=phpRegionDelimiter
2089 \ start=#<script language="php"># end=#</script>#
2090 \ contains=@phpClTop keepend extend
2091
2092if s:asp_tags
2093 syn region phpRegionAsp matchgroup=phpRegionDelimiter start=/<%=\=/ end=/%>/
2094 \ keepend extend contains=@phpClTop
2095endif
2096
2097if s:strict_blocks
d99475eb 2098 syn cluster phpClValues add=phpHTMLError
21166df1
AG
2099 syn match phpHTMLError /?>/ contained
2100endif
2101
2102" if using strict blocks, need to look out for HTML inside
2103" blocks
2104if s:strict_blocks
2105 " only allow in base-level code (not inside () or [])
d99475eb 2106 syn cluster phpClCode add=htmlRegion
21166df1
AG
2107 if s:long_tags
2108 " only match full php tags
2109 syn region htmlRegion contained contains=TOP matchgroup=phpRegionDelimiter
d99475eb 2110 \ start=/?>/ end=/<?php\w\@!/ keepend extend
21166df1
AG
2111 else
2112 " match any php tags
2113 syn region htmlRegion contained contains=TOP matchgroup=phpRegionDelimiter
d99475eb 2114 \ start=/?>/ end=/<?\%(php\w\@!\|=\)\=/ keepend extend
21166df1
AG
2115 endif
2116
2117 if s:asp_tags
2118 syn region htmlRegion contained contains=TOP matchgroup=phpRegionDelimiter
2119 \ start=/%>/ end=/<%=\=/ keepend extend
2120 endif
2121endif
2122
2123" if strict curly-braces matching is enabled, then match braces
2124" properly
2125if s:strict_blocks
2126 " DEFINITIONS FOR:
2127 " function ...() {
2128 " class ... {
2129 " method ...() {
2130 " these need to be done piece-by-piece so that we can use 'nextgroups'
2131 " to match the { } code blocks - we want to use special colors for them!
2132 " {{{1
2133
d99475eb
ER
2134 " Match the 'final' and 'abstract' keywords first, they can be inside the
2135 " global scope or inside a class declaration
2136 syn cluster phpClTop add=phpStructureType
2137 syn cluster phpClInClass add=phpStructureType
2138 syn keyword phpStructureType contained abstract final
2139
2140 " the phpStructure keywords (class/interface) can be found anywhere in
2141 " global scope
2142 syn cluster phpClTop add=phpStructure
2143
21166df1
AG
2144 " CLASSES: class myFoo extends baseFoo implements foo, Iterator { }: {{{2
2145 " I MATCH: <class myFoo> extends baseFoo implements foo, Iterator { }: {{{3
2146
21166df1
AG
2147 " 2: match the start of the class declaration
2148 syn keyword phpStructure contained class
2149 \ nextgroup=phpDefineClassName skipwhite skipempty
2150
2151 " 3: an empty placeholder for any class name (which in turn can contain
2152 " any of the known PHP class names)
2153 " NOTE: allow matching the class block immediately after the class name
d99475eb
ER
2154 syn cluster phpClClassHere add=phpDefineClassName
2155 syn match phpDefineClassName /\h\w*/ contained contains=@phpClStructures
2156 \ nextgroup=@phpClDefineClassBlock skipwhite skipempty
21166df1
AG
2157
2158 " II MATCH: class myFoo <extends baseFoo> implements foo, Iterator { }: {{{3
2159
2160 " match the 'extends' keyword and follow it by the match
2161 " for class names in a declaration (as above)
2162 syn keyword phpStructure contained extends
2163 \ nextgroup=phpDefineClassName skipwhite skipempty
2164
2165 " III MATCH: class myFoo extends baseFoo <implements foo, Iterator> { }: {{{3
2166
2167 " 1: match the 'implements' keyword and follow it by the match
2168 " for class names in a declaration (as above)
2169 syn keyword phpStructure contained implements
2170 \ nextgroup=@phpClDefineClassImplements skipwhite skipempty
2171
2172 " 2: define a place-holding for interfaces which matches any valid
2173 " interface name and also contains the recognized names
2174 syn cluster phpClDefineClassImplements add=phpDefineClassImplementsName
d99475eb
ER
2175 syn cluster phpClInterfaceHere add=phpDefineClassImplementsName
2176 syn cluster phpClClassHere add=phpDefineClassImplementsName
2177 syn match phpDefineClassImplementsName /\h\w*/ contained contains=@phpClStructures
21166df1
AG
2178 \ nextgroup=@phpClDefineClassImplements skipwhite skipempty
2179
2180 " 3: allow a comma in the list
2181 syn cluster phpClDefineClassImplements add=phpDefineClassImplementsComma
2182 syn match phpDefineClassImplementsComma /,/ contained
2183 \ nextgroup=@phpClDefineClassImplements skipwhite skipempty
2184
2185 " 4: there might be a '#' or '//'-style comment in-between!
2186 syn cluster phpClDefineClassImplements add=phpDefineClassImplementsCommentOneLine
2187 syn region phpDefineClassImplementsCommentOneLine
2188 \ start=/#/ start=,//, end=/$/ end=/.\ze?>/ oneline
2189 \ contained contains=phpComment
2190 \ nextgroup=@phpClDefineClassImplements skipwhite skipempty
2191
2192 " 5: there might a C-style comment (/*...*/) in-between
2193 syn cluster phpClDefineClassImplements add=phpDefineClassImplementsCommentCStyle
2194 syn region phpDefineClassImplementsCommentCStyle start=,/\*, end=,\*/, keepend
d99475eb 2195 \ contained contains=@Spell
21166df1
AG
2196 \ nextgroup=@phpClDefineClassImplements skipwhite skipempty
2197 hi link phpDefineClassImplementsCommentCStyle phpComment
2198
2199 " 6: add the block to the list so it can match here also
2200 syn cluster phpClDefineClassImplements add=phpClassBlock
2201
2202 " IV MATCH: class myFoo extends baseFoo implements foo, Iterator <{ }>: {{{3
2203
2204 " 1: there might be a '#' or '//'-style comment in-between!
2205 syn cluster phpClDefineClassBlock add=phpDefineClassBlockCommentOneline
2206 syn region phpDefineClassBlockCommentOneline start=/#/ start=,//, end=/$/ end=/.\ze?>/ oneline
2207 \ contained contains=phpComment
2208 \ nextgroup=@phpClDefineClassBlock skipwhite skipempty
2209
2210 " 2: there might a C-style comment (/*...*/) in-between
2211 syn cluster phpClDefineClassBlock add=phpDefineClassBlockCommentCStyle
2212 syn region phpDefineClassBlockCommentCStyle start=,/\*, end=,\*/, keepend
d99475eb 2213 \ contained contains=@Spell
21166df1
AG
2214 \ nextgroup=@phpClDefineClassBlock skipwhite skipempty
2215 hi link phpDefineClassBlockCommentCStyle phpComment
2216
2217 " 3: look for the actual { } block
2218 syn cluster phpClDefineClassBlock add=phpClassBlock
2219 if (s:folding == 1) || (s:folding == 2)
d99475eb
ER
2220 syn region phpClassBlock matchgroup=phpBraceClass start=/{/ end=/}/ keepend extend
2221 \ contained contains=@phpClInClass
21166df1
AG
2222 \ matchgroup=phpHTMLError end=/?>/
2223 \ fold
2224 else
d99475eb
ER
2225 syn region phpClassBlock matchgroup=phpBraceClass start=/{/ end=/}/ keepend extend
2226 \ contained contains=@phpClInClass
21166df1 2227 \ matchgroup=phpHTMLError end=/?>/
d99475eb
ER
2228 if s:fold_manual
2229 syn region phpClassBlock matchgroup=phpBraceClass start='{\ze\s*//\s*fold\s*$\c' end='}' keepend extend
2230 \ contained contains=@phpClInClass
2231 \ matchgroup=phpHTMLError end=/?>/
2232 \ fold
2233 endif
21166df1
AG
2234 endif
2235
2236
2237 " }}}2
2238
2239 " INTERFACES: interface myFoo extends baseFoo { }: {{{2
2240 " I MATCH: <interface myFoo> extends baseFoo { }: {{{3
2241
2242 " 1: match the start of the interface declaration
2243 syn keyword phpStructure contained interface
2244 \ nextgroup=phpDefineInterfaceName skipwhite skipempty
2245
2246 " 2: an empty placeholder for any interface name (which in turn can contain
2247 " any of the known PHP class names)
2248 " NOTE: allow matching the class block immediately after the class name
2249 " NOTE: maybe one day will make a separate block for interface bodies
d99475eb
ER
2250 syn cluster phpClClassHere add=phpDefineInterfaceName
2251 syn cluster phpClInterfaceHere add=phpDefineInterfaceName
2252 syn match phpDefineInterfaceName /\h\w*/ contained contains=@phpClStructures
21166df1
AG
2253 \ nextgroup=@phpClDefineClassBlock skipwhite skipempty
2254
2255 " II MATCH: interface myFoo <extends baseFoo> { }: {{{3
2256
2257 " NOTE: this is handled in the class syntax handling above
2258
2259 " IV MATCH: class myFoo extends baseFoo implements foo, Iterator <{ }>: {{{3
2260
2261 " NOTE: this is handled in the class syntax handling above
2262
2263 " }}}2
2264
2265 " FUNCTIONS: function & somefunc($a = 0, &$b) { }: {{{2
d99475eb
ER
2266 " I MATCH: <function> & somefunc($a = 0, &$b) { }: {{{3
2267
2268 " if we are finding functions anywhere, allow this match only
2269 syn cluster phpClCode add=phpDefine
2270
2271 syn keyword phpDefine function contained
2272 \ nextgroup=@phpClDefineFuncName,phpDefineFuncByRef
2273 \ skipwhite skipempty
21166df1
AG
2274
2275 " II MATCH: function <&> somefunc($a = 0, &$b) { }: {{{3
d99475eb
ER
2276
2277 " second, there might be a '&' return-by-reference option, so add
2278 " a match for that.
2279 syn match phpDefineFuncByRef /&/ contained nextgroup=@phpClDefineFuncName skipwhite skipnl
2280 hi link phpDefineFuncByRef phpAssignByRef
21166df1
AG
2281
2282
2283 " III MATCH: function & <somefunc>($a = 0, &$b) { }: {{{3
d99475eb
ER
2284
2285 " what can go inside a function name? Anything that does will need
2286 " a 'nextgroup=phpDefineFuncProto' argument!
21166df1
AG
2287
2288 " first up, an empty placeholder to match any valid function name.
2289 " It should contain the special user-defineable function names.
2290 syn cluster phpClDefineFuncName add=phpDefineFuncName
d99475eb 2291 syn cluster phpClFunctionHere add=phpDefineFuncName
21166df1 2292 syn match phpDefineFuncName /\h\w*/ contained
d99475eb 2293 \ contains=@phpClFunctions
21166df1
AG
2294 \ nextgroup=phpDefineFuncProto
2295 \ skipwhite skipempty
2296 " TODO: allow adding comments between 'function' and 'someFunc'
2297
2298
2299 " IV MATCH: function & somefunc<(>$a = 0, &$b<)> { }: {{{3
2300 " match the parenthesis surrounding the function arguments
d99475eb
ER
2301 if s:folding
2302 syn region phpDefineFuncProto contained contains=@phpClDefineFuncProtoArgs
2303 \ matchgroup=phpParent start=/(/ end=/)/ keepend extend
2304 \ nextgroup=@phpClDefineFuncBlock
2305 \ skipwhite skipempty
2306 \ fold
2307 else
2308 syn region phpDefineFuncProto contained contains=@phpClDefineFuncProtoArgs
2309 \ matchgroup=phpParent start=/(/ end=/)/ keepend extend
2310 \ nextgroup=@phpClDefineFuncBlock
2311 \ skipwhite skipempty
2312 endif
21166df1
AG
2313 " TODO: allow comments in this cluster
2314
2315
2316 " V MATCH: function & somefunc(<stdClass> $a = 0, &$b) { }: {{{3
2317 " first: any valid class name
d99475eb
ER
2318 syn cluster phpClDefineFuncProtoArgs add=@phpClClasses,@phpClInterfaces
2319
2320 " we still need to match an 'array' keyword, because it can be used for
2321 " parameter type-requirements
2322 syn cluster phpClDefineFuncProtoArgs add=phpProtoArrayCheck
2323 syn match phpProtoArrayCheck /\<array\>/ contained
2324 hi link phpProtoArrayCheck phpArray
21166df1
AG
2325
2326 " VI MATCH: function & somefunc(stdClass <$a => 0, <&$b>) { }: {{{3
2327
2328 " 1: match the by-ref '&'
2329 syn cluster phpClDefineFuncProtoArgs add=phpProtoArgByRef
d99475eb 2330 syn match phpProtoArgByRef /&/ display contained
21166df1
AG
2331 hi link phpProtoArgByRef phpAssignByRef
2332
2333 " 2: match a valid identifier
d99475eb 2334 syn cluster phpClDefineFuncProtoArgs add=phpIdentifier,phpAssign
21166df1
AG
2335
2336 " VII MATCH: function & somefunc(stdClass $a = <0>, &$b) { }: {{{3
2337 " What about other items? numbers? strings? arrays()?
2338 syn cluster phpClDefineFuncProtoArgs add=@phpClProtoValues
2339
2340 " 1: simple types (null, boolean)
2341 syn cluster phpClProtoValues add=phpNull
2342 syn cluster phpClProtoValues add=phpBoolean
2343
d99475eb 2344 " 2: numbers and strings and constants
21166df1
AG
2345 syn cluster phpClProtoValues add=phpNumber,phpFloat
2346 syn cluster phpClProtoValues add=phpStringSingle,phpStringDouble
d99475eb 2347 syn cluster phpClProtoValues add=@phpClConstants
21166df1
AG
2348
2349 " 3: arrays must be done separately to ensure ( and ) match correctly
2350 " (but only if using alt colors for arrays)
2351 if s:alt_arrays
2352 syn cluster phpClProtoValues add=phpProtoArray
d99475eb 2353 syn region phpProtoArray matchgroup=phpArrayParens start=/\<array\_s*(/ end=/)/ keepend extend
21166df1
AG
2354 \ contained contains=@phpClProtoValues,phpArrayPair
2355
2356 " don't allow arbitrary parenthesis here!!
2357 syn cluster phpClProtoValues add=phpProtoParentError
d99475eb 2358 syn match phpProtoParentError /(/ contained display
21166df1
AG
2359 hi link phpProtoParentError phpParentError
2360 else
2361 syn cluster phpClProtoValues add=phpArray
2362
2363 " need to allow arbitrary parenthesis for arrays
2364 syn cluster phpClProtoValues add=phpParentRegion
2365 endif
2366
2367 " 4: comments
2368 syn cluster phpClProtoValues add=phpComment
2369
2370
2371 " VIII MATCH: function & somefunc(</* foo */>) { }: {{{3
2372 " What about comment items?
2373 syn cluster phpClDefineFuncProtoArgs add=phpComment
2374
2375 " IX MATCH: function & somefunc(stdclass $a = 0, &$b) <{ }>: {{{3
2376
2377 " 1: there might be a '#' or '//'-style comment in-between!
2378 syn cluster phpClDefineFuncBlock add=phpDefineFuncBlockCommentOneline
2379 syn region phpDefineFuncBlockCommentOneline start=/#/ start=,//, end=/$/ end=/.\ze?>/ oneline
2380 \ contained contains=phpComment
2381 \ nextgroup=@phpClDefineFuncBlock skipwhite skipempty
2382
2383 " 2: there might a C-style comment (/*...*/) in-between
2384 syn cluster phpClDefineFuncBlock add=phpDefineFuncBlockCommentCStyle
2385 syn region phpDefineFuncBlockCommentCStyle start=,/\*, end=,\*/, keepend
d99475eb 2386 \ contained contains=@Spell
21166df1
AG
2387 \ nextgroup=@phpClDefineFuncBlock skipwhite skipempty
2388 hi link phpDefineFuncBlockCommentCStyle phpComment
2389
2390 " 3: look for the actual { } block
2391 " NOTE: how the function block will end at the next function
2392 " declaration: this helps stop the region extending indefinitely,
2393 " forcing the recalculation of all { } blocks for the rest of the file.
2394 " Otherwise, inserting an open-brace will
2395 " NOTE: that the error can't happen on a 'final', 'abstract', 'class',
2396 " or 'interface' keyword because they can't be contained in a function
2397 syn cluster phpClDefineFuncBlock add=phpFuncBlock
d99475eb
ER
2398
2399 let s:foldHere = s:folding ? 'fold' : ''
2400 let s:endEarly = s:nested_functions ? '' : 'matchgroup=Error end=/\%(^\|\s\)function\>/'
2401
2402" if s:folding
2403" if s:nested_functions
2404" syn region phpFuncBlock keepend extend matchgroup=phpBraceFunc start=/{/ end=/}/
2405" \ matchgroup=Error end=/\%(^\|\s\)\%(public\|private\|protected\)\>/
2406" \ contained contains=@phpClInFunction
2407" \ fold
2408" else
2409" syn region phpFuncBlock keepend extend matchgroup=phpBraceFunc start=/{/ end=/}/
2410" \ matchgroup=Error end=/\%(^\|\s\)function\>/
2411" \ matchgroup=Error end=/\%(^\|\s\)\%(public\|private\|protected\)\>/
2412" \ contained contains=@phpClInFunction
2413" \ fold
2414" endif
2415" else
2416" if s:nested_functions
2417" syn region phpFuncBlock keepend extend matchgroup=phpBraceFunc start=/{/ end=/}/
2418" \ matchgroup=Error end=/\%(^\|\s\)\%(public\|private\|protected\)\>/
2419" \ contained contains=@phpClInFunction
2420" else
2421" syn region phpFuncBlock keepend extend matchgroup=phpBraceFunc start=/{/ end=/}/
2422" \ matchgroup=Error end=/\%(^\|\s\)function\>/
2423" \ matchgroup=Error end=/\%(^\|\s\)p\%(ublic\|rivate\|rotected\)\>/
2424" \ contained contains=@phpClInFunction
2425" endif
2426" endif
2427
2428 execute 'syn region phpFuncBlock keepend extend matchgroup=phpBraceFunc'
2429 \ 'end=/}/ start=/{/'
2430 \ 'matchgroup=Error end=/\%(^\|\s\)\%(public\|private\|protected\)\>/'
2431 \ s:endEarly
2432 \ 'contained contains=@phpClInFunction'
2433 \ s:foldHere
2434 " for manual folding, we use an alternate start
2435 if s:fold_manual
2436 execute 'syn region phpFuncBlock keepend extend matchgroup=phpBraceFunc'
2437 \ 'start=#{\ze\s*//\s*fold\s*$\c# end=/}/'
2438 \ 'matchgroup=Error end=/\%(^\|\s\)\%(public\|private\|protected\)\>/'
2439 \ s:endEarly
2440 \ 'contained contains=@phpClInFunction'
2441 \ s:foldHere
2442 endif
2443 unlet s:foldHere s:endEarly
21166df1
AG
2444
2445 " }}}2
2446
2447 " METHODS: protected function & somefunc($a = 0, &$b) { }: {{{2
2448 " I MATCH: <protected function> somefunc($a = 0, &$b) { }: {{{3
2449
2450 " 1: match the final / abstract / private keywords at start
2451 " TODO: rename 'phpStorageClass' to Typedef (for global and static keywords)
2452 " and rename 'phpStorageClass2' to 'phpStorageClass'
d99475eb 2453 syn cluster phpClInClass add=phpStorageClass2
21166df1 2454 syn keyword phpStorageClass2 contained private protected public static final abstract
21166df1
AG
2455 hi link phpStorageClass2 phpStorageClass
2456
2457 syn keyword phpDefineMethod function contained containedin=phpClassBlock
2458 \ nextgroup=@phpClDefineMethodName,phpDefineMethodByRef
2459 \ skipwhite skipempty
2460 " TODO: add phpDefineFunction in the proper place
2461 hi link phpDefineFunction phpDefine
2462 hi link phpDefineMethod phpDefineFunction
2463
2464 " II MATCH: protected function <&> somefunc($a = 0, &$b) { }: {{{3
2465 " second, there might be a '&' return-by-reference option, so add
2466 " a match for that.
2467 syn match phpDefineMethodByRef /&/ contained
2468 \ nextgroup=@phpClDefineMethodName skipwhite skipnl
2469 hi link phpDefineMethodByRef phpDefineFuncByRef
2470
2471 " III MATCH: protected function & <somefunc>($a = 0, &$b) { }: {{{3
2472 " what can go inside a method name? Anything that does will need
2473 " a 'nextgroup=phpDefineMethodProto' argument!
2474
2475 " An empty placeholder to match any valid method name.
2476 " It should contain the special user-defineable method names.
2477 " NOTE: how we are just re-using 'function' block instead of
2478 " making more stuff to have a special 'method' block also.
2479 " I don't think it would be worthwhile at this stage.
2480 " NOTE: phpSpecialFunction must be included as well, because
2481 " that's a reserved function name and will break things.
2482 " TODO: cater for a new group, phpReservedFunction
2483 syn cluster phpClDefineMethodName add=phpDefineMethodName
d99475eb 2484 syn cluster phpClMethodHere add=phpDefineMethodName
21166df1 2485 syn match phpDefineMethodName /\h\w*/ contained
d99475eb 2486 \ contains=phpSpecialFunction,@phpClMethods
21166df1
AG
2487 \ nextgroup=phpDefineFuncProto
2488 \ skipwhite skipempty
2489 " TODO: allow adding comments between 'function' and 'someFunc'
2490
2491 " }}}2
2492
2493 " EXCEPTIONS: try/catch { } {{{2
d99475eb
ER
2494
2495 syn cluster phpClCode add=phpException
21166df1
AG
2496
2497 " 1: match the start of a try block
2498 syn keyword phpException try contained nextgroup=@phpClTryBlock skipwhite skipnl
2499
2500 " TODO: 2: allow having comments preceding the { } block?
2501
2502 " 3: match the try block
2503 syn cluster phpClTryBlock add=phpTryBlock
d99475eb 2504 " TODO: manual folding from here (search for \<fold\>)
21166df1 2505 if s:folding == 2
d99475eb 2506 syn region phpTryBlock matchgroup=phpBraceException start=/{/ end=/}/ keepend extend
21166df1
AG
2507 \ contained transparent
2508 \ fold
2509 else
d99475eb 2510 syn region phpTryBlock matchgroup=phpBraceException start=/{/ end=/}/ keepend extend
21166df1
AG
2511 \ contained transparent
2512 endif
2513
2514 " 3: match the start of the catch block
2515 syn keyword phpException catch contained nextgroup=phpCatchRegion skipwhite skipnl
2516 syn region phpCatchRegion matchgroup=phpParent start=/(/ end=/)/ keepend extend
d99475eb 2517 \ contained contains=@phpClExpressions
21166df1
AG
2518 \ nextgroup=@phpClCatchBlock skipwhite skipnl
2519
2520 " TODO: 4: allow having comments preceding the { } block?
2521
2522 " 5: match the catch block
2523 syn cluster phpClCatchBlock add=phpCatchBlock
2524 if s:folding == 2
d99475eb 2525 syn region phpCatchBlock matchgroup=phpBraceException start=/{/ end=/}/ keepend extend
21166df1
AG
2526 \ contained transparent
2527 \ fold
2528 else
d99475eb 2529 syn region phpCatchBlock matchgroup=phpBraceException start=/{/ end=/}/ keepend extend
21166df1
AG
2530 \ contained transparent
2531 endif
2532
21166df1
AG
2533 " }}}2
2534
2535 " }}}1
2536
2537 " make sure 'static' and 'global' work inside a function block
2538 " TODO: refactor this?
2539 syn keyword phpStorageClass static global contained
2540
2541 " set foldmethod if folding
2542 if s:folding
2543 set foldmethod=syntax
2544 endif
2545else
2546 " Fold
2547 if s:folding == 1 " {{{1
2548 " match one line constructs here and skip them at folding
2549 syn keyword phpSCKeyword abstract final private protected public static contained
2550 syn keyword phpFCKeyword function contained
2551 syn keyword phpStorageClass global contained
2552 syn match phpDefine "\(\s\|^\)\(abstract\s\+\|final\s\+\|private\s\+\|protected\s\+\|public\s\+\|static\s\+\)*function\(\s\+.*[;}]\)\@=" contained contains=phpSCKeyword
2553 syn match phpStructure "\(\s\|^\)\(abstract\s\+\|final\s\+\)*class\(\s\+.*}\)\@=" contained
2554 syn match phpStructure "\(\s\|^\)interface\(\s\+.*}\)\@=" contained
2555 syn match phpException "\(\s\|^\)try\(\s\+.*}\)\@=" contained
2556 syn match phpException "\(\s\|^\)catch\(\s\+.*}\)\@=" contained
2557
2558 set foldmethod=syntax
d99475eb
ER
2559 syn region phpFoldHtmlInside contained transparent contains=@htmlTop
2560 \ matchgroup=phpRegionDelimiter start="?>" end="<?\(php\w\@!\)\="
2561 syn region phpFoldFunction contained transparent fold extend
2562 \ matchgroup=StorageClass
2563 \ start="^\z(\s*\)\(abstract\s\+\|final\s\+\|private\s\+\|protected\s\+\|public\s\+\|static\s\+\)*function\s\([^};]*$\)\@="rs=e-9
2564 \ matchgroup=Delimiter end="^\z1}"
2565 \ contains=@phpClInFunction,phpFoldHtmlInside,phpFCKeyword
2566 syn region phpFoldFunction matchgroup=Define start="^function\s\([^};]*$\)\@="
2567 \ matchgroup=Delimiter end="^}"
2568 \ contains=@phpClInFunction,phpFoldHtmlInside contained transparent fold extend
2569 syn region phpFoldClass matchgroup=Structure start="^\z(\s*\)\(abstract\s\+\|final\s\+\)*class\s\+\([^}]*$\)\@=" matchgroup=Delimiter end="^\z1}"
2570 \ contains=@phpClInFunction,phpFoldFunction,phpSCKeyword contained transparent fold extend
21166df1
AG
2571 syn region phpFoldInterface matchgroup=Structure start="^\z(\s*\)interface\s\+\([^}]*$\)\@=" matchgroup=Delimiter end="^\z1}" contains=@phpClFunction,phpFoldFunction contained transparent fold extend
2572 syn region phpFoldCatch matchgroup=Exception start="^\z(\s*\)catch\%([^}]*$\)\@=" matchgroup=Delimiter end="^\z1}" contains=@phpClFunction,phpFoldFunction contained transparent fold extend
2573 syn region phpFoldTry matchgroup=Exception start="^\z(\s*\)try\s\+\([^}]*$\)\@=" matchgroup=Delimiter end="^\z1}" contains=@phpClFunction,phpFoldFunction contained transparent fold extend
2574
2575 elseif s:folding == 2 " {{{1
2576 syn keyword phpDefine function contained
2577 syn keyword phpStructure abstract class interface contained
2578 syn keyword phpException catch throw try contained
2579 syn keyword phpStorageClass final global private protected public static contained
2580
2581 set foldmethod=syntax
d99475eb 2582 syn region phpFoldHtmlInside matchgroup=phpRegionDelimiter start="?>" end="<?\(php\w\@!\)\=" contained transparent contains=@htmlTop
21166df1
AG
2583 syn region phpParent matchgroup=Delimiter start="{" end="}" keepend extend contained contains=@phpClFunction,phpFoldHtmlInside transparent fold
2584
2585 elseif s:folding == 3 " {{{1
2586 " match one line constructs here and skip them at folding
2587 syn keyword phpSCKeyword abstract final private protected public static contained
2588 syn keyword phpFCKeyword function contained
2589 syn keyword phpStorageClass global static contained
2590 syn keyword phpException catch throw try contained
2591
2592 syn match phpDefine "\(\s\|^\)\(abstract\s\+\|final\s\+\|private\s\+\|protected\s\+\|public\s\+\|static\s\+\)*function\(\s\+.*[;}]\)\@=" contained contains=phpSCKeyword
2593 syn match phpStructure "\(\s\|^\)\(abstract\s\+\|final\s\+\)*class\(\s\+.*}\)\@=" contained
2594 syn match phpStructure "\(\s\|^\)interface\(\s\+.*}\)\@=" contained
2595 syn match phpException "\(\s\|^\)try\(\s\+.*}\)\@=" contained
2596 syn match phpException "\(\s\|^\)catch\(\s\+.*}\)\@=" contained
2597
2598 " fold these:
2599 set foldmethod=syntax
d99475eb 2600 syn region phpFoldFunction matchgroup=StorageClass start="^\z(\s*\)\(abstract\s\+\|final\s\+\|private\s\+\|protected\s\+\|public\s\+\|static\s\+\)*function\s\([^};]*$\)\@="rs=e-9 matchgroup=Delimiter end="^\z1}" contains=@phpClFunction,phpFoldHtmlInside,phpFCKeyword contained transparent fold extend
21166df1
AG
2601 syn region phpFoldFunction matchgroup=Define start="^function\s\([^};]*$\)\@=" matchgroup=Delimiter end="^}" contains=@phpClFunction,phpFoldHtmlInside contained transparent fold extend
2602
2603 " don't fold these:
d99475eb 2604 syn region phpFoldHtmlInside matchgroup=phpRegionDelimiter start="?>" end="<?\(php\w\@!\)\=" contained transparent contains=@htmlTop
21166df1
AG
2605 syn region phpFoldClass matchgroup=Structure start="^\z(\s*\)\(abstract\s\+\|final\s\+\)*class\s\+\([^}]*$\)\@=" matchgroup=Delimiter end="^\z1}" contains=@phpClFunction,phpFoldFunction,phpSCKeyword contained transparent extend
2606 syn region phpFoldInterface matchgroup=Structure start="^\z(\s*\)interface\s\+\([^}]*$\)\@=" matchgroup=Delimiter end="^\z1}" contains=@phpClFunction,phpFoldFunction contained transparent extend
2607 syn region phpFoldCatch matchgroup=Exception start="^\z(\s*\)catch\s\+\([^}]*$\)\@=" matchgroup=Delimiter end="^\z1}" contains=@phpClFunction,phpFoldFunction contained transparent extend
2608 syn region phpFoldTry matchgroup=Exception start="^\z(\s*\)try\s\+\([^}]*$\)\@=" matchgroup=Delimiter end="^\z1}" contains=@phpClFunction,phpFoldFunction contained transparent extend
2609
2610 else " {{{1
2611 syn keyword phpDefine contained function
2612 syn keyword phpStructure contained abstract class interface
2613 syn keyword phpException contained catch throw try
2614 syn keyword phpStorageClass contained final global private protected public static
2615 endif " }}} 1
2616
2617 " always need these
2618 syn keyword phpStructure contained extends implements
2619endif
2620
2621" ================================================================
2622" Peter Hodge - June 9, 2006
2623" Some of these changes (highlighting isset/unset/echo etc) are not so
2624" critical, but they make things more colourful. :-)
2625
21166df1 2626
d99475eb
ER
2627" different syntax highlighting for 'echo', 'print', 'switch', 'die' and 'list' keywords
2628" to better indicate what they are.
2629" TODO: convert 'echo' and 'include' to regions so that it cannot contain other control
2630" structures
2631"syn cluster phpClCode add=phpEcho
2632"syn keyword phpEcho contained echo
2633syn cluster phpClCode add=phpEchoRegion
2634if s:strict_blocks
2635 syn region phpEchoRegion contained keepend extend contains=@phpClExpressions,phpEchoComma
2636 \ matchgroup=phpEcho start=/\$\@<!\<echo\>/ end=/;/ end=/\ze?>/
2637 \ matchgroup=Error end=/[})\]]/
2638else
2639 syn cluster phpClCode add=phpEcho
2640 syn keyword phpEcho contained echo
2641endif
21166df1 2642
d99475eb
ER
2643syn match phpEchoComma contained display /,/
2644hi! link phpEchoComma phpEcho
21166df1 2645
d99475eb
ER
2646syn cluster phpClExpressions add=phpPrint,phpInclude
2647syn keyword phpPrint contained print
2648syn keyword phpInclude contained include require include_once require_once
21166df1 2649
d99475eb 2650" match when a '(type)' is used to cast the type of something
21166df1
AG
2651
2652" Highlighting for PHP5's user-definable magic class methods
d99475eb 2653syn cluster phpClMethods add=phpSpecialMethods
21166df1
AG
2654syn keyword phpSpecialMethods contained containedin=phpRegion
2655 \ __construct __destruct __sleep __wakeup __clone __set_state __toString
2656 \ __set __get __unset __isset __call
2657
d99475eb
ER
2658" these methods are used by the SPL Interfaces
2659syn cluster phpClMethods add=phpSPLMethods
2660" Serializable
2661syn keyword phpSPLMethods contained serialize unserialize
2662" ArrayAccess
2663syn keyword phpSPLMethods contained offsetSet offsetGet offsetExists offsetUnset
2664" Iterator
2665syn keyword phpSPLMethods contained current next key valid rewind
2666" IteratorAggregate
2667syn keyword phpSPLMethods contained getIterator
2668" RecursiveIterator
2669syn keyword phpSPLMethods contained hasChildren getChildren current next key valid rewind
2670" OuterIterator
2671syn keyword phpSPLMethods contained getInnerIterator current next key valid rewind
2672" SeekableIterator
2673syn keyword phpSPLMethods contained seek current next key valid rewind
2674" Countable
2675syn keyword phpSPLMethods contained count
2676" SplObserver
2677syn keyword phpSPLMethods contained update
2678" SplSubject
2679syn keyword phpSPLMethods contained attach detach notify
2680" Reflector
2681syn keyword phpSPLMethods contained export
2682hi link phpSPLMethods phpSpecialMethods
2683
2684syn keyword phpSpecialFunction contained __autoload
21166df1
AG
2685
2686" Highlighting for PHP5's built-in classes
2687" - built-in classes harvested from get_declared_classes() in 5.1.4
d99475eb 2688syn cluster phpClClasses add=phpClasses
21166df1
AG
2689syn keyword phpClasses contained containedin=phpRegion
2690 \ stdClass __PHP_Incomplete_Class php_user_filter Directory ArrayObject
2691 \ Exception ErrorException LogicException BadFunctionCallException BadMethodCallException DomainException
2692 \ RecursiveIteratorIterator IteratorIterator FilterIterator RecursiveFilterIterator ParentIterator LimitIterator
2693 \ CachingIterator RecursiveCachingIterator NoRewindIterator AppendIterator InfiniteIterator EmptyIterator
2694 \ ArrayIterator RecursiveArrayIterator DirectoryIterator RecursiveDirectoryIterator
2695 \ InvalidArgumentException LengthException OutOfRangeException RuntimeException OutOfBoundsException
2696 \ OverflowException RangeException UnderflowException UnexpectedValueException
2697 \ PDO PDOException PDOStatement PDORow
2698 \ Reflection ReflectionFunction ReflectionParameter ReflectionMethod ReflectionClass
2699 \ ReflectionObject ReflectionProperty ReflectionExtension ReflectionException
2700 \ SplFileInfo SplFileObject SplTempFileObject SplObjectStorage
2701 \ XMLWriter LibXMLError XMLReader SimpleXMLElement SimpleXMLIterator
2702 \ DOMException DOMStringList DOMNameList DOMDomError DOMErrorHandler
2703 \ DOMImplementation DOMImplementationList DOMImplementationSource
2704 \ DOMNode DOMNameSpaceNode DOMDocumentFragment DOMDocument DOMNodeList DOMNamedNodeMap
2705 \ DOMCharacterData DOMAttr DOMElement DOMText DOMComment DOMTypeinfo DOMUserDataHandler
2706 \ DOMLocator DOMConfiguration DOMCdataSection DOMDocumentType DOMNotation DOMEntity
2707 \ DOMEntityReference DOMProcessingInstruction DOMStringExtend DOMXPath
d99475eb 2708 \ DateTime DateTimeZone
21166df1
AG
2709
2710" Highlighting for PHP5's built-in interfaces
2711" - built-in classes harvested from get_declared_interfaces() in 5.1.4
d99475eb 2712syn cluster phpClInterfaces add=phpInterfaces
21166df1
AG
2713syn keyword phpInterfaces contained
2714 \ Iterator IteratorAggregate RecursiveIterator OuterIterator SeekableIterator
2715 \ Traversable ArrayAccess Serializable Countable SplObserver SplSubject Reflector
2716"
2717" add php_errormsg as a special variable
21166df1 2718
21166df1 2719
d99475eb
ER
2720"syn cluster phpClExpressions add=phpProperty
2721"syn match phpProperty /->\_s*\%(\$\=\h\w*\)\@>\ze\_s*(\@!/ display extend
2722" \ contained contains=phpPropertySelector,phpIdentifier,@phpClProperties
2723"syn match phpPropertySelector /->/ contained display
21166df1
AG
2724
2725" for going in string where can be followed by () without making it a method
2726" call
d99475eb
ER
2727"syn match phpPropertySelectorInString /->/ contained display
2728"hi link phpPropertySelectorInString phpPropertySelector
21166df1
AG
2729
2730if s:special_functions
2731 " Highlighting for PHP built-in functions which exhibit special behaviours
2732 " - isset()/unset()/empty() are not real functions.
2733 " - compact()/extract() directly manipulate variables in the local scope where
2734 " regular functions would not be able to.
d99475eb 2735 " - eval() and assert()
21166df1
AG
2736 " - user_error()/trigger_error() can be overloaded by set_error_handler and also
2737 " have the capacity to terminate your script when type is E_USER_ERROR.
d99475eb
ER
2738 syn cluster phpClFunctions add=phpSpecialFunction
2739 syn keyword phpSpecialFunction contained
2740 \ user_error trigger_error isset unset empty eval assert extract compact __halt_compiler
21166df1
AG
2741endif
2742
2743" special highlighting for '=&' operator
d99475eb
ER
2744syn cluster phpClExpressions add=phpAssignByRef
2745syn match phpAssignByRef /=\_s*&/ contained display
2746
2747" call-time pass-by-reference
2748syn match phpAssignByRef /&\$\@=/ contained display
21166df1
AG
2749
2750" highlighting for the '@' error-supressing operator
d99475eb 2751syn cluster phpClExpressions add=phpSupressErrors
21166df1 2752syn match phpSupressErrors /@/ contained display
21166df1
AG
2753
2754" ================================================================
2755
2756" Sync
d99475eb
ER
2757if s:sync == -1
2758" syn sync match phpSyncKeyword grouphere phpRegion /\ze\$\@<!\<class\>/
2759" syn sync match phpSyncKeyword grouphere phpRegion /\ze\$\@<!\<interface\>/
2760
2761 " best things to look for are the class/interface keywords or
2762 " private/protected/public keywords, as we can be 100% confident where we
2763 " are when we find them
2764 if s:strict_blocks
2765 syn sync match phpClassStart grouphere phpClassBlock
2766 \ /\$\@<!\<class\%(\%(\s\+\w\+\)\+\)\@>\s*{/
2767 " Note: the 'var' and 'const' sync methods have been causing Vim to miss
2768 " out the '?>' at the end of a file, so I had to drop them out. I'm not
2769 " sure if it syncs faster
2770" syn sync match phpSyncKeyword grouphere phpClassBlock /\ze\$\@<!\<var\>/
2771" syn sync match phpSyncKeyword grouphere phpClassBlock /\ze\$\@<!\<const\>/
2772" syn sync match phpSyncKeyword grouphere phpClassBlock
2773" \ /\$\@<!\<p\%(rivate\|rotected\|ublic\)\>/
2774 endif
2775
2776 syn sync match phpSyncStartOfFile grouphere NONE /\%^/
2777
2778 " watch out for strings and comments in syncing process
2779 " TODO: make sure this actually works
2780 syn sync region phpSyncComment start=/\/\// start=/#/ end=/$/
2781 syn sync region phpSyncString start=/\z(['"]\)/ skip=/\\./ end=/\z1/
2782
21166df1
AG
2783 if s:long_tags
2784 syn sync match phpRegionSync grouphere phpRegion "^\s*<?php\s*$"
2785 else
d99475eb 2786 syn sync match phpRegionSync grouphere phpRegion "^\s*<?\(php\w\@!\)\=\s*$"
21166df1 2787 endif
d99475eb
ER
2788" syn sync match phpRegionSync grouphere phpRegionSc +^\s*<script language="php">\s*$+
2789" if s:asp_tags
2790" syn sync match phpRegionSync grouphere phpRegionAsp "^\s*<%\(=\)\=\s*$"
2791" endif
2792" syn sync match phpRegionSync grouphere NONE "^\s*?>\s*$"
2793" syn sync match phpRegionSync grouphere NONE "^\s*%>\s*$"
2794" syn sync match phpRegionSync grouphere phpRegion "function\s.*(.*\$"
2795" "syn sync match phpRegionSync grouphere NONE "/\i*>\s*$"
2796
2797" Sync backwards a certain number of lines?
2798"elseif s:sync > 0
2799" exec "syn sync minlines=" . s:sync
2800
21166df1
AG
2801else
2802 syn sync fromstart
2803endif
2804
2805" Define the default highlighting.
2806" For version 5.7 and earlier: only when not done already
2807" For version 5.8 and later: only when an item doesn't have highlighting yet
2808if version >= 508 || !exists("did_php_syn_inits")
2809 if version < 508
2810 let did_php_syn_inits = 1
2811 command -nargs=+ HiLink hi link <args>
2812 else
2813 "command -nargs=+ HiLink hi def link <args>
2814 command -nargs=+ HiLink hi link <args>
2815 endif
2816
2817 " Peter Hodge, June 17 2006
2818 " - I'm optimizing these highlight links for the default
2819 " colorscheme, or 'elflord' when it would make a major
2820 " difference.
2821 " After most HiLinks I have noted which color the group
2822 " will revert back to under default or elflord.
2823
2824 " TODO: remove this testing
d99475eb 2825 let s:is_elflord = (exists('g:colors_name') && g:colors_name == 'elflord')
21166df1
AG
2826
2827 if exists("php_oldStyle")
2828 hi phpOperator guifg=SeaGreen ctermfg=DarkGreen
2829 hi phpIdentifier guifg=DarkGray ctermfg=Brown
2830" hi phpIdentifierSimply guifg=DarkGray ctermfg=Brown
2831 hi phpVarSelector guifg=SeaGreen ctermfg=DarkGreen
2832
2833 hi phpRelation guifg=SeaGreen ctermfg=DarkGreen
2834
d99475eb 2835 hi phpSuperglobal guifg=Red ctermfg=DarkRed
21166df1
AG
2836 else
2837 HiLink phpOperator Operator " => Statement(Yellow) / Operator(Red)
2838 HiLink phpIdentifier Identifier " => Identifier(Cyan)
d99475eb 2839 HiLink phpIdentifierErratic phpIdentifier
21166df1 2840
d99475eb
ER
2841 HiLink phpVarSelector Operator
2842 HiLink phpVarSelectorDeref PreProc
2843 HiLink phpVarSelectorError Error
2844
2845 HiLink phpType Type
2846
2847 " list() / arrays
2848 HiLink phpList phpType
21166df1
AG
2849 HiLink phpArray phpType
2850 if s:alt_arrays
2851 HiLink phpArrayParens phpArray
2852 HiLink phpArrayPair phpArray
2853
21166df1
AG
2854 if s:alt_arrays == 2
2855 HiLink phpArrayComma phpArrayParens
2856 endif
2857 else
2858 HiLink phpArrayParens phpParent
2859 HiLink phpArrayPair phpOperator
2860 endif
d99475eb
ER
2861 HiLink phpListComma phpArrayComma
2862 HiLink phpArrayPairError Error
21166df1
AG
2863
2864 if s:alt_comparisons
2865 if s:is_elflord
2866 HiLink phpRelation Statement " => Yellow
2867 else
2868 HiLink phpRelation Constant " => Constant (SlateBlue)
2869 endif
2870 else
2871 HiLink phpRelation phpOperator
2872 endif
2873
2874 " special variables support:
d99475eb
ER
2875 if s:special_vars
2876 " NOTE: this is better highlighted using the 'Operator' colour ...
2877 HiLink phpSuperglobal Operator " => Special (orange/red)
21166df1 2878 else
d99475eb 2879 HiLink phpSuperglobal phpIdentifier
21166df1
AG
2880 endif
2881 endif
2882
d99475eb
ER
2883 " support for other variables
2884 HiLink phpBuiltinVar phpSuperglobal
2885 HiLink phpLongVar phpSuperglobal
2886 HiLink phpEnvVar phpSuperglobal
2887
21166df1
AG
2888 " language:
2889 HiLink phpComment Comment " Slateblue
2890
2891 HiLink phpSemicolon Macro " => PreProc (LightMagenta)
d99475eb
ER
2892 HiLink phpSemicolonNotAllowedHere Error
2893
21166df1 2894 HiLink phpDefine Define " => PreProc (LightMagenta)
d99475eb 2895 HiLink phpObjectOperator phpDefine
21166df1
AG
2896 HiLink phpInclude Include " => PreProc (LightMagenta)
2897
d99475eb
ER
2898 HiLink phpEcho Macro " => PreProc (LightMagenta)
2899 HiLink phpPrint phpEcho
2900
21166df1 2901 HiLink phpParent Delimiter " => Special (Red)
d99475eb
ER
2902 if s:alt_control_parents
2903 HiLink phpControlParent phpConditional
2904 else
2905 HiLink phpControlParent phpParent
2906 endif
2907 HiLink phpBrace phpParent " => Special (Red)
2908 HiLink phpBraceError Error " => Error
21166df1
AG
2909
2910 if s:alt_blocks
d99475eb
ER
2911 HiLink phpBraceFunc phpDefine
2912 HiLink phpBraceClass phpStructure
2913 HiLink phpBraceException phpException
21166df1 2914 else
d99475eb
ER
2915 HiLink phpBraceFunc phpBrace
2916 HiLink phpBraceClass phpBrace
2917 HiLink phpBraceException phpBrace
21166df1
AG
2918 endif
2919
21166df1
AG
2920 " other operations
2921 HiLink phpSupressErrors PreProc " LightMagenta
2922
2923 if s:alt_refs
2924 HiLink phpAssignByRef Type " Green
2925 else
2926 HiLink phpAssignByRef Operator " Red
2927 endif
2928
2929 HiLink phpMemberSelector Structure " => Type (Green)
2930 if s:alt_properties
2931 HiLink phpPropertySelector Function " => Identifier (Cyan) / (White)
d99475eb 2932 HiLink phpDynamicSelector Operator " => Operator (Red) / (White)
21166df1
AG
2933 else
2934 HiLink phpPropertySelector phpMemberSelector
d99475eb 2935 HiLink phpDynamicSelector phpMemberSelector
21166df1
AG
2936 endif
2937
2938
2939 " execution control structures
2940 HiLink phpConditional Conditional " => Statement (Yellow) / Repeat (White)
2941 HiLink phpRepeat Repeat " => Statement (Yellow) / Repeat (White)
2942 HiLink phpStatement Statement " (Yellow / Brown)
d99475eb 2943 HiLink phpCase Label " => Statement (Yellow / Brown)
21166df1
AG
2944 HiLink phpException Exception " => Statement (Yellow)
2945
2946 " constants
2947 HiLink phpMagicConstant Constant " Pink / Magenta
2948 HiLink phpCoreConstant Constant " Pink / Magenta
2949 HiLink phpNumber Number " => Constant (Pink)
2950 HiLink phpFloat Float " => Constant (Pink)
2951 HiLink phpBoolean phpType
2952 HiLink phpNull phpType
d99475eb
ER
2953
2954 HiLink phpStringSingle String
2955 HiLink phpStringDouble phpStringSingle
2956 HiLink phpStringDoubleConstant phpStringSingle
2957 HiLink phpBacktick phpStringSingle
2958
2959 HiLink phpStringLiteral SpecialChar
2960
21166df1
AG
2961 HiLink phpSpecialChar SpecialChar " => Special (Orange / Red)
2962
2963 " keywords (mainly class / function definitions)
2964 HiLink phpStorageClass StorageClass " => Type (Green)
2965 HiLink phpSCKeyword phpStorageClass
d99475eb 2966
21166df1 2967 HiLink phpStructure Structure " => Type (Green)
d99475eb
ER
2968 HiLink phpStructureType phpStructure
2969
21166df1 2970 HiLink phpFCKeyword phpDefine
d99475eb
ER
2971 HiLink phpMagicClass StorageClass
2972 if s:alt_comparisons
2973 HiLink phpInstanceof phpRelation
2974 else
2975 HiLink phpInstanceof phpMagicClass
2976 endif
21166df1
AG
2977
2978 if s:show_quotes
2979 HiLink phpQuoteSingle String
2980 HiLink phpQuoteDouble String
2981 else
2982 HiLink phpQuoteSingle Normal
2983 HiLink phpQuoteDouble Normal
2984 endif
2985
2986 " always highlight backtick quotes like an operator
2987 " (seeing as it executes stuff)
2988 HiLink phpQuoteBacktick phpOperator
2989
2990 " built-in langauge functions / classes
2991 HiLink phpFunctions Function " => Identifier (Cyan) / Function (White)
2992 HiLink phpClasses phpFunctions
2993 HiLink phpMethods phpFunctions
2994 HiLink phpInterfaces phpCoreConstant
2995 HiLink phpSpecialFunction SpecialComment " => Special (Orange / Red)
2996 HiLink phpSpecialMethods phpSpecialFunction
2997
2998 " other items
2999 HiLink phpMemberError Error
3000 HiLink phpParentError Error
3001 HiLink phpHTMLError Error
3002 HiLink phpOctalError Error
3003 HiLink phpTodo Todo
21166df1
AG
3004
3005 " Peter Hodge June 17, 2006:
3006 " changed matchgroup for phpRegion from Delimiter to phpRegionDelimiter
3007 HiLink phpRegionDelimiter Debug " => Special (Orange / Red)
3008
3009 " changed matchgroup for phpHereDoc to phpHereDocDelimiter
3010 HiLink phpHereDocDelimiter phpRegionDelimiter " => Special (Orange / Red)
3011
3012 delcommand HiLink
3013endif
3014
3015" optional support for PCRE extension (preg_* functions)
3016if s:show_pcre
3017 " ===================================================
3018 " Note: I have deliberately neglected to support the '\cx' functionality
3019 " - it would do more harm than good by complicating this already-
3020 " mind-numbing syntax file when nobody really needs this feature in
3021 " PHP.
d99475eb 3022 " TODO: add support for '\cx' sequences (I changed my mind)
21166df1
AG
3023
3024 " 1) Allow for dropping out of SQ and concatenating a variable {{{
3025
3026 " flag a lone quote as an error!
d99475eb
ER
3027 syn match pregError /'/ display contained containedin=pregPattern_S
3028 syn match pregError /"/ display contained containedin=pregPattern_D
21166df1
AG
3029
3030 " find real concatenations (overrides the errors)
d99475eb 3031 syn region pregConcat matchgroup=phpQuoteSingle start=#'\ze\%(\%(\_s*\|\/\*.\{-}\*\/\|\/\/.*\n\)*\)\@>\.# end=/'/
21166df1
AG
3032 \ skip=/\['.\{-}'\]\|('.\{-}'[,)]/
3033 \ keepend extend
3034 \ contained containedin=pregPattern_S
d99475eb 3035 \ contains=@phpClExpressions
21166df1
AG
3036 syn region pregConcat matchgroup=phpQuoteDouble start=/"/ end=/"/
3037 \ skip=/\[".\{-}"\]\|(".\{-}"[,)]/
3038 \ keepend extend
3039 \ contained containedin=pregPattern_D
d99475eb 3040 \ contains=@phpClExpressions
21166df1
AG
3041 " }}}
3042
3043 " 2) look for special characters {{{
3044
3045 " TODO: re-examine how \$ is going to fit into a double-quoted string ...
3046 syn match pregSpecial /\$/ contained containedin=pregPattern_S display
3047 syn match pregSpecial /\$/ contained containedin=pregPattern_D display
3048 \ contains=phpIdentifierInString,phpIdentifierInStringComplex
3049 syn match pregSpecial /\^/ contained containedin=@pregPattern_Q display
3050 syn match pregSpecial /|/ contained containedin=@pregPattern_Q display
3051 syn match pregDot /\./ contained containedin=@pregPattern_Q display
3052
3053 " TODO: move these things out of here???
3054 " find a ] character at the start of a character range ...
3055 syn match pregClassIncStartBracket /\]/ contained display containedin=@pregClassIncStart_Q
3056 syn match pregClassExcStartBracket /\]/ contained display containedin=@pregClassExcStart_Q
3057 hi link pregClassIncStartBracket pregClassInc
3058 hi link pregClassExcStartBracket pregClassExc
3059 " }}}
3060
3061 " 3) look for escape sequences {{{
3062
3063 " look for any escape sequence inside the pattern and mark them as errors
3064 " by default, all escape sequences are errors
d99475eb
ER
3065 " NOTE: adding 'display' to this next one can break the highlighting
3066 " (because it contains sequences such as \" which aren't supposed to end
3067 " the string)
3068 syn match pregEscapeUnknown /\\./ contained containedin=@pregPattern_Q
21166df1
AG
3069
3070 " TODO: when \$ is encountered, the \ is a PHP escape and prevents
3071 " variable expansion, but the '$' becomes the end-of-line wildcard.
3072 " \\$ will match a literal '$', but the '$' might be part of a variable
3073 " name also. \\\$ is the proper way to match
3074
3075 " TODO: deprecate these clusters?
3076 " TODO: deprecate pregClass_any
3077 syn cluster pregClass_any add=@pregClassInc,pregClassExc
3078 syn cluster pregClassRange_any_S add=pregClassIncRange_S,pregClassExcRange_S
3079 syn cluster pregClassRange_any_D add=pregClassIncRange_D,pregClassExcRange_D
3080
3081 syn match pregClassEscapeUnknown /\\[^\^\-\]]/ contained containedin=@pregClass_any_Q display
d99475eb 3082 syn match pregClassEscape /\\[^a-zA-Z0-9]/ contained containedin=@pregClass_any_Q display extend
21166df1
AG
3083
3084 " known escape sequences:
3085 syn match pregClassIncEscapeKnown /\C\\[abtnfret]/ contained display
3086 \ containedin=@pregClassInc_Q,@pregClassIncRange_Q
3087 syn match pregClassIncEscapeRange /\\[dsw]/ contained display
3088 \ containedin=@pregClassInc_Q,@pregClassIncRange_Q
3089 syn match pregClassExcEscapeKnown /\C\\[abtnfret]/ contained display
3090 \ containedin=@pregClassExc_Q,@pregClassExcRange_Q
3091 syn match pregClassExcEscapeRange /\\[dsw]/ contained display
3092 \ containedin=@pregClassExc_Q,@pregClassExcRange_Q
3093
3094 " ... including hex sequences
3095 syn match pregClassIncEscapeKnown /\C\\x\x\{0,2}/ contained display
3096 \ containedin=@pregClassInc_Q,@pregClassIncRange_Q
3097 syn match pregClassExcEscapeKnown /\C\\x\x\{0,2}/ contained display
3098 \ containedin=@pregClassExc_Q,@pregClassExcRange_Q
3099
3100 " ... and octal sequences
3101 syn match pregClassIncEscapeKnown /\\\o\{1,3}/ contained display
3102 \ containedin=@pregClassInc_Q,@pregClassIncRange_Q
3103 syn match pregClassExcEscapeKnown /\\\o\{1,3}/ contained display
3104 \ containedin=@pregClassExc_Q,@pregClassExcRange_Q
3105
3106 syn match pregClassEscapeMainQuote /\\'/ contained transparent display contains=pregEscapePHP
3107 \ containedin=@pregClass_any_S,@pregClassRange_any_S
3108 syn match pregClassEscapeMainQuote /\\"/ contained transparent display contains=pregEscapePHP
3109 \ containedin=@pregClass_any_D,@pregClassRange_any_D
3110
3111 syn match pregClassEscape /\\\\\ze\\'/ contained display
3112 \ containedin=@pregClass_any_S contains=pregEscapePHP
3113 \ nextgroup=pregClassEscapeMainQuote
3114 syn match pregClassEscape /\\\\\ze\\"/ contained display
3115 \ containedin=@pregClass_any_D contains=pregEscapePHP
3116 \ nextgroup=pregClassEscapeMainQuote
3117
3118 syn match pregClassEscapeDouble1 /\\\\\ze\\\\/ contained containedin=@pregClass_any_Q display
3119 \ contains=pregEscapePHP
3120 \ nextgroup=pregClassEscapeDouble2
3121 syn match pregClassEscapeDouble2 /\\\\/ contained transparent display
3122 \ containedin=@pregClassRange_any_S,@pregClassRange_any_D
3123 \ contains=pregEscapePHP
3124 hi link pregClassEscapeDouble1 pregClassEscape
3125
3126 " in the unknown escapes, match those that make a special character
3127 " take on its literal meaning (except for <single-quote> which is covered next)
3128 " NOTE: am changing these from being contained inside pregEscapeUnknown
3129 " to being in the main scope to make SQ and DQ containment easier
3130 syn match pregEscapeLiteral /\\[^A-Za-z0-9]/ contained containedin=@pregPattern_Q display
3131 syn match pregEscapeLiteral /\\\{4}/ contained containedin=@pregPattern_Q display
3132
3133 " for single-quoted strings
3134 syn match pregEscapeLiteral /\\"/ contained containedin=pregPattern_S display
3135 syn match pregEscapeLiteral /\\\\\\'/ contained containedin=pregPattern_S display contains=pregEscapePHP
3136
3137 " for double-quoted strings
3138 syn match pregEscapeLiteral /\\'/ contained containedin=pregPattern_D display
3139 syn match pregEscapeLiteral /\\\\\\"/ contained containedin=pregPattern_D display contains=pregEscapePHP
3140
3141 syn match pregEscapeMainQuote /\\'/ contained containedin=pregPattern_S display
3142 syn match pregEscapeMainQuote /\\"/ contained containedin=pregPattern_D display
3143
3144 " match the escaped strings which are known
3145 syn match pregBackreference /\\[1-9][0-9]\=/ contained containedin=pregEscapeUnknown display
3146 syn match pregEscapeSpecial /\C\\[rnt]/ contained containedin=pregEscapeUnknown display
3147 syn match pregEscapeSpecial /\C\\x\x\{0,2}/ contained containedin=pregEscapeUnknown display
3148 syn match pregEscapeSpecial /\\\%(0\o\{0,2}\|\o\o\o\)/ contained containedin=pregEscapeUnknown display
3149 syn match pregEscapeRange /\\[wsd]/ contained containedin=pregEscapeUnknown display
3150 syn match pregEscapeAnchor /\C\\[AbBGzZ]/ contained containedin=pregEscapeUnknown display
3151
3152 " unicode characters
3153 syn match pregEscapeUnicode /\C\\X/ contained containedin=pregEscapeUnknown display
3154 syn match pregEscapeUnicodeError /\c\\p{\^\=\w\+}/ contained display
3155 \ containedin=pregEscapeUnknown,pregClassEscapeUnknown
3156 syn match pregEscapeUnicode /\\p{^\=/ contained containedin=pregEscapeUnicodeError display
3157 syn match pregEscapeUnicode /\CC[cfnos]\=/ contained containedin=pregEscapeUnicodeError display
3158 syn match pregEscapeUnicode /\CL[lmotu]\=/ contained containedin=pregEscapeUnicodeError display
3159 syn match pregEscapeUnicode /\CM[cen]\=/ contained containedin=pregEscapeUnicodeError display
3160 syn match pregEscapeUnicode /\CN[dlo]\=/ contained containedin=pregEscapeUnicodeError display
3161 syn match pregEscapeUnicode /\CP[cdefios]\=/ contained containedin=pregEscapeUnicodeError display
3162 syn match pregEscapeUnicode /\CS[ckmo]\=/ contained containedin=pregEscapeUnicodeError display
3163 syn match pregEscapeUnicode /\CZ[lps]\=/ contained containedin=pregEscapeUnicodeError display
3164 syn match pregEscapeUnicode /}/ contained containedin=pregEscapeUnicodeError display
3165 " shorthand
3166 syn match pregEscapeUnicode /\C\\[pP][CLMNPSZ]/ contained display
3167 \ containedin=pregEscapeUnknown,pregClassEscapeUnknown
3168
3169 " match the PHP escaping in literal escapes
3170 syn match pregEscapePHP /\\./he=s+1 contained display containedin=pregEscapeMainQuote
3171 syn match pregEscapePHP /\\\\/he=s+1 contained display containedin=pregEscapeLiteral
3172
3173 " this captures confusing usage of escape characters:
3174 " - need to make sure they don't capture the quote character because
3175 " that wouldn't right
3176 syn match pregEscapeNotNeeded /\\\ze\\[^\\']/ contained display containedin=pregPattern_S,@pregClass_any_S
3177 syn match pregEscapeNotNeeded /\\\ze\\[^\\"]/ contained display containedin=pregPattern_D,@pregClass_any_D
3178
3179 " a triple-backslash can be dangerous: it is not obvious that
3180 " the meaning of the 3rd backslash is dependent on the following
3181 " character; if the following character is changed to a
3182 " single-quote or backslash, it will change the meaning of the 3
3183 " backslashes
3184 syn match pregEscapeLiteral /\\\{3}\ze[^\\']/ contained display containedin=pregPattern_S
3185 syn match pregEscapeLiteral /\\\{3}\ze[^\\"]/ contained display containedin=pregPattern_D
3186 syn match pregClassEscape /\\\{3}\ze[^\\']/ contained display contains=pregClassEscapePHP containedin=@pregClass_any_S
3187 syn match pregClassEscape /\\\{3}\ze[^\\"]/ contained display contains=pregClassEscapePHP containedin=@pregClass_any_D
3188 syn match pregClassEscapePHP /\\\\/he=s+1 contained
3189 hi link pregClassEscapePHP pregEscapePHP
3190 " }}}
3191
3192 " 4) Look for quantifiers ?*+{1,2} {{{
3193
3194 syn match pregQuantifier /\*?\=/ contained containedin=@pregPattern_Q display
3195 syn match pregQuantifier /+?\=/ contained containedin=@pregPattern_Q display
3196 syn match pregQuantifier /??\=/ contained containedin=@pregPattern_Q display
3197
d99475eb
ER
3198 syn match pregQuantifierComplex /{\d\+\(,\d*\)\=}/ contained containedin=@pregPattern_Q display
3199 syn match pregQuantifierComplex /{,\d\+}/ contained containedin=@pregPattern_Q display
21166df1
AG
3200 syn match pregQuantifier /\d\+/ contained containedin=pregQuantifierComplex display
3201 " }}}
3202
3203 " 5) Look for sub-patterns {{{
3204 syn match pregParens /(/ contained containedin=@pregPattern_Q display
3205 syn match pregParens /(?<[=!]/ contained containedin=@pregPattern_Q display extend
3206 syn match pregParens /(?[:>=!]/ contained containedin=@pregPattern_Q display extend
3207 syn match pregParens /(?(?<\=[=!]/ contained containedin=@pregPattern_Q display extend
3208
3209 " recursion
3210 syn match pregParens /(?R)/ contained containedin=@pregPattern_Q display extend
3211 syn match pregParens /(?[1-9]\d\=)/ contained containedin=@pregPattern_Q display extend
3212 \ contains=pregBackreferenceNumber
3213
3214 " conditional sub-patterns
3215 syn match pregParens /(?(\d\+)/ contained containedin=@pregPattern_Q display
3216 \ contains=pregBackreferenceNumber
3217 syn match pregBackreferenceNumber /\d\+/ contained display
3218 " TODO: move hi link out of here?
3219 hi link pregBackreferenceNumber pregBackreference
3220 syn match pregParens /(?\a\+\(-\a\+\)\=[):]/ contained containedin=@pregPattern_Q display
3221 \ contains=pregOption
3222 syn match pregParens /(?-\a\+[):]/ contained containedin=@pregPattern_Q display
3223 \ contains=pregOption
3224 syn match pregParens /)/ contained containedin=@pregPattern_Q display
3225
3226 " find a named backreference
d99475eb 3227 syn match pregBackreference contained containedin=@pregPattern_Q /(?P>\w\+)/ display
21166df1 3228 \ contains=pregNamedBackreference
d99475eb 3229 syn match pregParens contained containedin=@pregPattern_Q /(?P<\w\+>/ display
21166df1
AG
3230 \ contains=pregNamedBackreference
3231
d99475eb
ER
3232 syn match pregNamedBackreference /(?P>\zs\w\+\ze)/ contained display
3233 syn match pregNamedBackreference /(?P<\zs\w\+\ze>/ contained display
21166df1
AG
3234 hi link pregNamedBackreference pregEscapeRange
3235 " }}}
3236
3237 " 6) Look for PCRE patterns {{{
d99475eb 3238 syn cluster phpClFunctions add=phpPREGFunctions
21166df1
AG
3239
3240 " look for preg_* functions which take a single pattern
3241 syn keyword phpPREGFunctions contained preg_match preg_match_all preg_split preg_grep
d99475eb 3242 \ nextgroup=phpPREGOpenParent,phpPREGRegion
21166df1
AG
3243
3244 " special case for preg_replace functions which can take an array of
3245 " patterns
3246 syn keyword phpPREGFunctions contained preg_replace preg_replace_callback
3247 \ nextgroup=phpPREGOpenParentMulti,phpPREGRegionMulti skipwhite skipempty
3248
3249 if s:strict_blocks
3250 " regions for ( ) after name of preg_* function
3251 syn region phpPREGRegion matchgroup=phpParent start=/(/ end=/)/ keepend extend
d99475eb 3252 \ contained contains=@phpClExpressions,phpPREGStringStarter
21166df1 3253 syn region phpPREGRegionMulti matchgroup=phpParent start=/(/ end=/)/ keepend extend
d99475eb 3254 \ contained contains=@phpClExpressions,phpPREGStringStarter,phpPREGArray
21166df1
AG
3255
3256 " match an array of preg patterns
3257 if s:alt_arrays
d99475eb 3258 syn region phpPREGArray matchgroup=phpArrayParens start=/\%((\_s*\)\@<=array\_s*(/ end=/)/
21166df1
AG
3259 \ keepend extend
3260 \ contained
d99475eb 3261 \ contains=@phpClExpressions,phpPREGStringStarter,phpPREGArrayComma,phpPREGArrayComment
21166df1
AG
3262 else
3263 syn match phpPREGArray /\%((\_s*\)\@<=array/ contained
3264 \ nextgroup=phpPREGArrayRegion skipwhite skipempty
3265
3266 syn region phpPREGArrayRegion matchgroup=phpParent start=/(/ end=/)/
3267 \ keepend extend
3268 \ contained
3269 \ contains=phpPREGStringStarter,phpPREGArrayComment,phpPREGArrayComma
3270 endif
3271 hi link phpPREGArray phpArray
3272
3273 " a special match to open a pattern string immediately after a '('
3274 " TODO: will this work as a match instead?
3275" syn region phpPREGStringStarter start=/\%((\_s*\)\@<=\z(['"]\)/ end=/\z1/ extend
3276" \ contained contains=@phpPREGString_any
3277 syn match phpPREGStringStarter /\%((\_s*\)\@<=['"]/ extend
3278 \ contained contains=@phpPREGString_any
3279
3280 " TODO: move 'hi link' commands out of here
3281 hi link phpPREGArrayComma phpArrayComma
3282 else
3283 " highlight the opening parenthesis
3284 syn match phpPREGOpenParent /(/ contained nextgroup=@phpPREGString_any display
3285 hi link phpPREGOpenParent phpParent
3286 syn match phpPREGOpenParentMulti /(/ contained display
3287 \ nextgroup=@phpPREGString_any,phpPREGArray skipwhite skipnl skipempty
3288 hi link phpPREGOpenParentMulti phpPREGOpenParent
3289
3290 " TODO: move 'hi link' commands out of here
3291 " match an array of preg patterns
3292 syn keyword phpPREGArray array contained nextgroup=phpPREGArrayOpenParent
3293 hi link phpPREGArray phpType
3294 syn match phpPREGArrayOpenParent /(/ contained display
3295 \ nextgroup=@phpPREGArrayString_any skipwhite skipnl skipempty
3296 hi link phpPREGArrayOpenParent phpPREGOpenParent
3297 endif
3298
3299 " match a phpString (single or double-quoted) which is able to contain a
3300 " pregPattern
3301 " NOTE: we can only error on comma-ending as long as the delimiter is
3302 " not a comma!!!
3303 syn cluster phpPREGString_any add=phpPREGStringSingle,phpPREGStringDouble
3304 syn region phpPREGStringSingle matchgroup=phpQuoteSingle start=/'\ze\z(.\)/ end=/'/
3305 \ keepend extend contained contains=pregPattern_S
3306 \ matchgroup=Error end=/\z1\@!,/
3307 syn region phpPREGStringDouble matchgroup=phpQuoteSingle start=/"\ze\z(.\)/ end=/"/
3308 \ keepend extend contained contains=pregPattern_D
3309 \ matchgroup=Error end=/\z1\@!,/
3310
3311 " match a single-quoted string inside an array, followed by a comma
3312 " and another string
3313 " TODO: remove hi link commands from here
3314 syn cluster phpPREGArrayString_any add=phpPREGArrayStringSingle,phpPREGArrayStringDouble
3315 syn region phpPREGArrayStringSingle matchgroup=phpQuoteSingle start=/'/ end=/'/
3316 \ keepend extend contained contains=pregPattern_S
3317 \ nextgroup=phpPREGArrayComma skipwhite skipnl skipempty
3318 hi link phpPREGArrayStringSingle phpPREGStringSingle
3319 syn region phpPREGArrayStringDouble matchgroup=phpQuoteDouble start=/"/ end=/"/
3320 \ keepend extend contained contains=pregPattern_D
3321 \ nextgroup=phpPREGArrayComma skipwhite skipnl skipempty
3322 hi link phpPREGArrayStringDouble phpPREGStringDouble
3323
3324 " use the comma inside a pattern array to trigger off the next pattern
3325 syn match phpPREGArrayComma /,/ contained
3326 \ nextgroup=@phpPREGArrayString_any skipwhite skipnl skipempty
3327
3328 " use the comments inside a pattern array to trigger off the next pattern
d99475eb 3329 syn region phpPREGArrayComment start=#//# end=#$# contained keepend extend contains=@Spell
21166df1 3330 \ nextgroup=@phpPREGArrayString_any skipwhite skipnl skipempty
d99475eb 3331 syn region phpPREGArrayComment start=#/\*# end=#\*/# contained keepend extend contains=@Spell
21166df1
AG
3332 \ nextgroup=@phpPREGArrayString_any skipwhite skipnl skipempty
3333 hi link phpPREGArrayComment phpComment
3334 " }}}
3335
3336 " 7) Look for pattern delimiters {{{
3337 syn cluster pregPattern_Q add=pregPattern_S,pregPattern_D
3338
3339 " add a region which starts with any valid delimiter character
3340 " and ends when the delimiter character is met again
3341 syn region pregPattern_S matchgroup=pregDelimiter
3342 \ start=/\z([ !"#$%&*+,-./:;=?@^_`|~]\)/ start=/\z(\\'\)/
3343 \ end=/\z1/ skip=/\\\\\{2,3}\|\\\\\z1\=\|\\\z1/ keepend extend
3344 \ contained nextgroup=pregOptionError_S
d99475eb
ER
3345 \ contains=pregCommentMultiline
3346 " repeat above command, but this time instead of the multi-line comment,
3347 " make it 'oneline'
3348 syn region pregPattern_S matchgroup=pregDelimiter
3349 \ start=/\z([ !"#$%&*+,-./:;=?@^_`|~]\)/ start=/\z(\\'\)/
3350 \ end=/\z1/ skip=/\\\\\{2,3}\|\\\\\z1\=\|\\\z1/ keepend extend
3351 \ contained nextgroup=pregOptionError_S
3352 \ oneline
21166df1
AG
3353
3354 function! s:pregPattern_S(open, close)
3355 execute 'syntax region pregPattern_S matchgroup=pregDelimiter'
d99475eb
ER
3356 \ 'start=/' . a:open . '/'
3357 \ 'end=/' . a:close . '/'
21166df1
AG
3358 \ 'skip=/\\\{4}\|\\\\\=./ keepend extend'
3359 \ 'contained nextgroup=pregOptionError_S'
3360 endfunction
3361 function! s:pregPattern_D(open, close)
3362 execute 'syntax region pregPattern_D matchgroup=pregDelimiter'
d99475eb
ER
3363 \ 'start=/' . a:open . '/'
3364 \ 'end=/' . a:close . '/'
21166df1
AG
3365 \ 'skip=/\\\{4}\|\\\\\=./ keepend extend'
3366 \ 'contained nextgroup=pregOptionError_D'
3367 endfunction
d99475eb
ER
3368 call s:pregPattern_S('(', ')')
3369 call s:pregPattern_S('<', '>')
3370 call s:pregPattern_S('\[', '\]')
3371 call s:pregPattern_S('{', '}')
3372 call s:pregPattern_D('(', ')')
3373 call s:pregPattern_D('<', '>')
3374 call s:pregPattern_D('\[', '\]')
3375 call s:pregPattern_D('{', '}')
21166df1
AG
3376
3377 " TODO: make a cluster for the things which go inside double-quoted
3378 " strings!
d99475eb
ER
3379 syn region pregPattern_D matchgroup=pregDelimiter
3380 \ start=/\z([ !'#$%&*+,-./:;=?@^_`|~]\)/ start=/\z(\\"\)/
3381 \ end=/\z1/ skip=/\\\\\{2,3}\|\\\\\z1\=\|\\\z1/
3382 \ keepend extend
3383 \ contained nextgroup=pregOptionError_D
3384 \ contains=phpIdentifierInString,phpIdentifierInStringComplex,pregCommentMultiline
3385 " repeat above command, but this time instead of the multi-line comment,
3386 " make it 'oneline'
21166df1
AG
3387 syn region pregPattern_D matchgroup=pregDelimiter
3388 \ start=/\z([ !'#$%&*+,-./:;=?@^_`|~]\)/ start=/\z(\\"\)/
3389 \ end=/\z1/ skip=/\\\\\{2,3}\|\\\\\z1\=\|\\\z1/
3390 \ keepend extend
3391 \ contained nextgroup=pregOptionError_D
3392 \ contains=phpIdentifierInString,phpIdentifierInStringComplex
d99475eb 3393 \ oneline
21166df1
AG
3394
3395 " TODO: work out how to have '$' as delimiter in a double-quoted string
3396" syn region pregPattern_D matchgroup=pregDelimiter
3397" \ start=/\\\$\|\$[a-z_]\@!\%({[a-z_$]\)\@!/
3398" \ end=/\\\$\|\$[a-z_]\@!\%({[a-z_$]\)\@!/ skip=/\\\{4}\|\\\{3}[^$]\|\\\\\$/
3399" \ keepend extend
3400" \ contained nextgroup=pregOptionError_D
3401" \ contains=phpIdentifierInString,phpIdentifierInStringComplex
3402
3403 " TODO move hi link out of here
3404 hi link pregPattern_S pregPattern
3405 hi link pregPattern_D pregPattern
3406 " }}}
3407
3408 " 8) Look for character classes {{{
3409 " Inc[lusive] and Exc[lusive] character classes:
3410 " if the first char is ']'
3411 " that is tricky so is handled by another match below
3412 syn cluster pregClassInc_Q add=pregClassInc_S,pregClassInc_D
3413 syn cluster pregClassExc_Q add=pregClassExc_S,pregClassExc_D
3414 syn cluster pregClass_any_S add=pregClassInc_S,pregClassExc_S
3415 syn cluster pregClass_any_D add=pregClassInc_D,pregClassExc_D
3416 syn cluster pregClass_any_Q add=@pregClassInc_Q,@pregClassExc_Q
3417
d99475eb
ER
3418 " TODO: does that 'skip' need to be copied to the line below?
3419 syn region pregClassInc_S matchgroup=pregClassParent start=/\[\ze[^\^\]]/ end=/\]/ skip=/\\\%(\\\\\]\)\@!\&\\./
21166df1
AG
3420 \ keepend display contained containedin=pregPattern_S
3421 syn region pregClassInc_D matchgroup=pregClassParent start=/\[\ze[^\^\]]/ end=/\]/ skip=/\\./
3422 \ keepend display contained containedin=pregPattern_D
3423 " TODO: move these out of here???
3424 hi link pregClassInc_S pregClassInc
3425 hi link pregClassInc_D pregClassInc
3426 hi link pregClassExc_S pregClassExc
3427 hi link pregClassExc_D pregClassExc
3428
3429 syn region pregClassExc_S matchgroup=pregClassParent start=/\[\^\]\@!/ end=/\]/ skip=/\\./
3430 \ keepend display contained containedin=pregPattern_S
3431 syn region pregClassExc_D matchgroup=pregClassParent start=/\[\^\]\@!/ end=/\]/ skip=/\\./
3432 \ keepend display contained containedin=pregPattern_D
3433
3434 " TODO: move hi link commands out of here
3435
3436 " TODO: just use one match for all character classes???
3437 " this is an alternate form of the character class region,
3438 " it is not contained in @pregPattern_Q and can only be activated
3439 " by a nextgroup=pregClassInc.
3440 " 'EXECUTE'ed:
3441 "syntax region pregClassInc_S start=/\ze./ matchgroup=pregClassParent end=/\]/ skip=/\\\\\|\\]/ contained display
3442 "syntax region pregClassInc_D start=/\ze./ matchgroup=pregClassParent end=/\]/ skip=/\\\\\|\\]/ contained display
3443 "syntax region pregClassExc_S start=/\ze./ matchgroup=pregClassParent end=/\]/ skip=/\\\\\|\\]/ contained display
3444 "syntax region pregClassExc_D start=/\ze./ matchgroup=pregClassParent end=/\]/ skip=/\\\\\|\\]/ contained display
3445 let s:command = 'syntax region pregClass<TYPE> start=/\ze./ matchgroup=pregClassParent end=/\]/'
3446 \ . ' skip=/\\\\\|\\]/ contained display keepend'
3447 execute substitute(s:command, '<TYPE>', 'Inc_S', 'g')
3448 execute substitute(s:command, '<TYPE>', 'Inc_D', 'g')
3449 execute substitute(s:command, '<TYPE>', 'Exc_S', 'g')
3450 execute substitute(s:command, '<TYPE>', 'Exc_D', 'g')
3451 unlet! s:command
3452
3453 " this is a special match to start off the character class
3454 " region when the very first character inside it is ']',
3455 " because otherwise the character class region would end
3456 " immediately
3457 syn cluster pregClassIncStart_Q add=pregClassIncStart_S,pregClassIncStart_D
3458 syn cluster pregClassExcStart_Q add=pregClassExcStart_S,pregClassExcStart_D
3459 let s:command = 'syntax match pregClassIncStart_<QUOTE> /\[\]/ contained display'
3460 \ . ' containedin=pregPattern_<QUOTE> nextgroup=pregClassInc_<QUOTE>,pregClassIncEnd'
3461 execute substitute(s:command, '<QUOTE>', 'S', 'g')
3462 execute substitute(s:command, '<QUOTE>', 'D', 'g')
3463 let s:command = 'syntax match pregClassExcStart_<QUOTE> /\[\^\]/ contained display'
3464 \ . ' containedin=pregPattern_<QUOTE> nextgroup=pregClassExc_<QUOTE>,pregClassExcEnd'
3465 execute substitute(s:command, '<QUOTE>', 'S', 'g')
3466 execute substitute(s:command, '<QUOTE>', 'D', 'g')
3467 unlet! s:command
3468
3469 " TODO: move hi link commands out of here
3470 hi link pregClassIncStart_S pregClassParent
3471 hi link pregClassIncStart_D pregClassParent
3472 hi link pregClassExcStart_S pregClassParent
3473 hi link pregClassExcStart_D pregClassParent
3474
3475 " this is a special match to end off the character class immediately
3476 " should a ']' be followed immediately by another ']'
3477 " TODO: move hi link commands out of here
3478 syn match pregClassIncEnd /\]/ contained display
3479 hi link pregClassIncEnd pregClassParent
3480 syn match pregClassExcEnd /\]/ contained display
3481 hi link pregClassExcEnd pregClassParent
3482
3483 " add the range-matching string here
3484 syn cluster pregClassIncRange_Q add=pregClassIncRange_S,pregClassIncRange_D
3485 syn cluster pregClassExcRange_Q add=pregClassExcRange_S,pregClassExcRange_D
3486 syn match pregClassIncRange_S contained display
3487 \ containedin=pregClassInc_S,pregClassIncStart_S
3488 \ /\%([^\\]\|\\\%(\\\{2}[\\']\=\|x\x\{0,2}\|\o\{1,3}\|[^dsw]\)\)-\%(\\\{3,4}\|\\[^dsw]\|[^\\\]]\)/
3489 syn match pregClassIncRange_D contained display
3490 \ containedin=pregClassInc_D,pregClassIncStart_D
3491 \ /\%([^\\]\|\\\%(\\\{2}[\\"]\=\|x\x\{0,2}\|\o\{1,3}\|[^dsw]\)\)-\%(\\\{3,4}\|\\[^dsw]\|[^\\\]]\)/
3492 syn match pregClassExcRange_S contained display
3493 \ containedin=pregClassExc_S,pregClassExcStart_S
3494 \ /\%([^\\]\|\\\%(\\\{2}[\\']\=\|x\x\{0,2}\|\o\{1,3}\|[^dsw]\)\)-\%(\\\{3,4}\|\\[^dsw]\|[^\\\]]\)/
3495 syn match pregClassExcRange_D contained display
3496 \ containedin=pregClassExc_D,pregClassExcStart_D
3497 \ /\%([^\\]\|\\\%(\\\{2}[\\']\=\|x\x\{0,2}\|\o\{1,3}\|[^dsw]\)\)-\%(\\\{3,4}\|\\[^dsw]\|[^\\\]]\)/
3498 hi link pregClassIncRange_S pregClassIncRange
3499 hi link pregClassIncRange_D pregClassIncRange
3500 hi link pregClassExcRange_S pregClassExcRange
3501 hi link pregClassExcRange_D pregClassExcRange
3502
3503 " what about the pre-defined sets using [:space:]?
3504 syn region pregClassSetRegion matchgroup=pregClassSet start=/\[:/ end=/:\]/
3505 \ extend keepend
3506 \ contained containedin=@pregClass_any_Q contains=pregClassSet
3507 hi link pregClassSetRegion Error
3508 syn keyword pregClassSet contained
3509 \ alnum digit punct
3510 \ alpha graph space
3511 \ blank lower upper
3512 \ cntrl print xdigit
3513 hi link pregClassSet pregEscapeRange
d99475eb
ER
3514
3515 " highlighted a lone single/double quote as an error
3516 syn match pregClassQuoteError contained display /'/ containedin=@pregClass_any_S
3517 syn match pregClassQuoteError contained display /"/ containedin=@pregClass_any_D
3518 hi link pregClassQuoteError Error
3519
21166df1
AG
3520 " }}}
3521
3522 " 9) Look for escaping using \Q and \E {{{
d99475eb 3523 syn region pregNonSpecial_S matchgroup=pregParens start=/\C\\Q/ end=/\C\\E/
21166df1 3524 \ contained containedin=pregPattern_S
d99475eb 3525 syn region pregNonSpecial_D matchgroup=pregParens start=/\C\\Q/ end=/\C\\E/
21166df1
AG
3526 \ contained containedin=pregPattern_D
3527 hi link pregNonSpecial_S pregNonSpecial
3528 hi link pregNonSpecial_D pregNonSpecial
3529 hi link pregNonSpecial pregPattern
3530
3531 " I'm just going to rebuild escapes here to make it easier
d99475eb
ER
3532 syn match pregError /'/ contained containedin=pregNonSpecial_S display
3533 syn match pregError /"/ contained containedin=pregNonSpecial_D display
3534 syn match pregNonSpecialEscape /\\['\\]/ contained containedin=pregNonSpecial_S display
3535 syn match pregNonSpecialEscape /\\["\\$]/ contained containedin=pregNonSpecial_D display
3536 syn match pregNonSpecialEscapePHP /\\./he=s+1 contained containedin=pregNonSpecialEscape display
3537 syn match pregNonSpecialEscapePHP /\\[rnt]/ contained containedin=pregNonSpecial_D display
21166df1
AG
3538 hi link pregNonSpecialEscapePHP pregEscapePHP
3539 " }}}
3540
3541 " 10) Match PCRE pattern options {{{
3542 syn match pregOptionError_S /\%(\\[\\']\|[^']\)\+/ contained contains=pregOption display
3543 syn match pregOptionError_D /\%(\\[\\"]\|[^"]\)\+/ contained display
3544 \ contains=pregOption,phpIdentifierInString,phpIdentifierInStringComplex
3545 syn match pregOption /\C[eimsuxADSUX]\+/ contained display
3546 " TODO: move hi links out of here?
3547 hi link pregOptionError_S pregOptionError
3548 hi link pregOptionError_D pregOptionError
3549 " }}}
3550
3551 " 11) PCRE pattern comments {{{
d99475eb 3552 syn match pregComment /\v\(\?\#[^)]*\)/ contained containedin=@pregPattern_Q contains=@Spell
21166df1
AG
3553
3554 " TODO: multi-line comments must be turned on explicitly!?
3555 " syntax match pregComment /\v\#(.*)@>/ contained containedin=@pregPattern_Q
d99475eb
ER
3556" if exists('b:php_preg_multiline')
3557 syntax match pregCommentMultiline /\#\(.*\)\@>/ contained contains=@Spell
3558 hi! link pregCommentMultiline pregComment
3559" endif
21166df1
AG
3560 " }}}
3561
3562 " 12) highlight links {{{
3563 command -nargs=+ HiLink hi link <args>
3564
3565 HiLink phpPREGFunctions phpFunctions
3566 HiLink phpPREGOpenParent phpParent
3567 HiLink phpPREGStringSingle phpStringSingle
3568 HiLink phpPREGStringDouble phpStringDouble
3569
3570 HiLink pregError Error
3571 HiLink pregAmbiguous Todo
3572
3573 HiLink pregDelimiter Statement
3574
3575 HiLink pregOptionError Error
3576 HiLink pregOption Type
3577
3578 HiLink pregComment phpComment
3579
3580 HiLink pregEscapeDelimiter pregDelimiter
3581 HiLink pregEscapeUnknown pregAmbiguous
3582 HiLink pregEscapeLiteral Comment
3583 HiLink pregEscapeSpecial Number
3584 HiLink pregEscapeAnchor Typedef
3585 HiLink pregEscapeRange Identifier
3586 HiLink pregEscapePHP phpSpecialChar
3587 HiLink pregEscapeUnicode pregEscapeRange
3588 HiLink pregEscapeUnicodeError pregError
3589
3590 HiLink pregEscapeNotNeeded pregEscapePHP
3591
3592 HiLink pregPattern Normal
3593 HiLink pregSpecial Typedef
3594 HiLink pregDot Typedef
3595 HiLink pregParens PreProc
3596 HiLink pregBackreference pregParens
3597
3598 HiLink pregQuantifier Typedef
3599 HiLink pregQuantifierComplex Typedef
3600
3601 HiLink pregClassParent pregParens
3602 HiLink pregClassInc pregClassParent
3603 HiLink pregClassExc pregClassParent
3604 HiLink pregClassIncRange Identifier
3605 HiLink pregClassExcRange Identifier
3606 HiLink pregClassEscape Comment
3607 HiLink pregClassIncEscapeKnown pregEscapeSpecial
3608 HiLink pregClassIncEscapeRange pregClassIncRange
3609 HiLink pregClassExcEscapeKnown Type
3610 HiLink pregClassExcEscapeRange pregClassExcRange
3611 HiLink pregClassEscapeUnknown pregAmbiguous
3612
3613 delcommand HiLink
3614 " }}}
3615endif
3616
3617" ================================================================
3618
3619let b:current_syntax = "php"
3620
3621if main_syntax == 'php'
3622 unlet main_syntax
3623endif
3624
d99475eb 3625" vim: sw=2 sts=2 et fdm=marker fdc=1
This page took 0.707329 seconds and 4 git commands to generate.