syn region htmlTag start=+<[^/]+ end=+>+ contains=htmlString,htmlTagName,htmlArg,htmlValue,htmlTagError,htmlEvent,php3Region1,php3Region2
syn region javaScript start=+<script+ end=+</script>+ contains=javaScriptSpecial,javaScriptNumber,javaScriptLineComment,javaScriptComment,javaScriptStringS,javaScriptStringD,javaStringCharacter,javaStringSpecialCharacter,javaScriptConditional,javaScriptRepeat,javaScriptBranch,javaScriptOperator,javaScriptType,javaScriptStatement,javaScriptFunction,javaScriptBoolean,javaScriptBraces,javaScriptParen,javaScriptParenError,php3Region1,php3Region2
syn case match
" Env Variables
syn keyword php3EnvVar SERVER_SOFTWARE SERVER_NAME SERVER_URL GATEWAY_INTERFACE contained
syn keyword php3EnvVar SERVER_PROTOCOL SERVER_PORT REQUEST_METHOD PATH_INFO contained
syn keyword php3EnvVar PATH_TRANSLATED SCRIPT_NAME QUERY_STRING REMOTE_HOST contained
syn keyword php3EnvVar REMOTE_ADDR AUTH_TYPE REMOTE_USER CONTEN_TYPE contained
syn keyword php3EnvVar CONTENT_LENGTH HTTPS HTTPS_KEYSIZE HTTPS_SECRETKEYSIZE contained
syn keyword php3EnvVar HTTP_ACCECT HTTP_USER_AGENT HTTP_IF_MODIFIED_SINCE contained
syn keyword php3EnvVar HTTP_FROM contained
syn case ignore
" Internal Variables
syn keyword php3IntVar phperrmsg php_self contained
" Comment
syn region php3Comment start="/\*" skip=">" end="\*/" contained contains=php3Todo
syn match php3Comment2 "#.*$" contained contains=php3Todo
" Function names
syn keyword php3Functions Abs contained
syn keyword php3Functions ada_afetch ada_autocommit ada_close ada_commit contained
syn keyword php3Functions ada_connect ada_exec ada_fetchrow ada_fieldname contained
syn keyword php3Functions ada_fieldnum ada_fieldtype ada_freeresult ada_numfields contained
syn keyword php3Functions ada_numrows ada_result ada_resultall ada_rollback contained
syn keyword php3Functions array arsort asort count current end key ksort contained
syn keyword php3Functions list next pos prev reset rsort sizeof sort contained
syn keyword php3Functions max min OctDec pi pow rand round Sin Sqrt srand contained
syn keyword php3Functions Tan contained
syn keyword php3Functions sleep usleep uniqid leak contained
syn keyword php3Functions msql msql_close msql_connect msql_create_db contained
syn keyword php3Functions msql_createdb msql_data_seek msql_dbname contained
syn keyword php3Functions msql_drop_db msql_dropdb msql_error contained
syn keyword php3Functions msql_fetch_array msql_fetch_field msql_fetch_object contained
syn keyword php3Functions msql_fetch_row msql_fieldname msql_field_seek contained
syn keyword php3Functions msql_fieldtable msql_fieldtype msql_fieldflags contained
syn keyword php3Functions msql_fieldlen msql_free_result msql_freeresult contained
syn keyword php3Functions msql_list_fields msql_listfields msql_list_dbs contained
syn keyword php3Functions msql_listdbs msql_list_tables msql_listtables contained
syn keyword php3Functions msql_num_fields msql_num_rows msql_numfields contained
syn keyword php3Functions msql_numrows msql_pconnect msql_query contained
syn keyword php3Functions msql_regcase msql_result msql_select_db contained
syn keyword php3Functions msql_selectdb msql_tablename contained
syn keyword php3Functions mysql_affected_rows mysql_close mysql_connect contained
syn keyword php3Functions mysql_create_db mysql_data_seek mysql_dbname contained
syn keyword php3Functions mysql_db_query mysql_drop_db mysql_errno contained
syn keyword php3Functions mysql_error mysql_fetch_array mysql_fetch_field contained
syn keyword php3Functions mysql_fetch_lengths mysql_fetch_object contained
syn keyword php3Functions mysql_fetch_row mysql_field_name mysql_field_seek contained
syn keyword php3Functions mysql_field_table mysql_field_type mysql_field_flags contained
syn keyword php3Functions mysql_field_len mysql_free_result mysql_insert_id contained
syn keyword php3Functions mysql_list_dbs mysql_list_tables mysql_num_fields contained
syn keyword php3Functions mysql_num_rows mysql_pconnect mysql_query contained
syn keyword php3Functions mysql_resulti mysql_select_db mysql_tablename contained
syn keyword php3Functions sybase_close sybase_connect sybase_data_seek contained
syn keyword php3Functions sybase_fetch_array sybase_fetch_field contained
syn keyword php3Functions sybase_fetch_object sybase_fetch_row sybase_field_seek contained
syn keyword php3Functions sybase_num_fields sybase_num_rows sybase_pconnect contained
syn keyword php3Functions sybase_query sybase_result sybase_select_db contained
syn keyword php3Functions fsockopen gethostbyaddr gethostbyname openlog contained
syn keyword php3Functions syslog closelog debugger_on debugger_off contained
syn keyword php3Functions odbc_autocommit odbc_binmode odbc_close contained
syn keyword php3Functions odbc_close_all odbc_commit odbc_connect contained
syn keyword php3Functions odbc_cursor odbc_do odbc_exec odbc_execute contained
syn keyword php3Functions odbc_fetch_into odbc_fetch_row odbc_field_name contained
syn keyword php3Functions odbc_field_num odbc_field_type odbc_free_result contained
syn keyword php3Functions odbc_longreadlen odbc_num_fields odbc_pconnect contained
syn keyword php3Functions odbc_prepare odbc_num_rows odbc_result contained
syn keyword php3Functions odbc_result_all odbc_rollback contained
syn keyword php3Functions Ora_Close Ora_ColumnName Ora_ColumnType contained
syn keyword php3Functions Ora_Commit Ora_CommitOff Ora_CommitOn Ora_Error contained
syn keyword php3Functions Ora_ErrorCode Ora_Exec Ora_Fetch Ora_GetColumn contained
syn keyword php3Functions Ora_Logoff Ora_Logon Ora_Open Ora_Parse contained
syn keyword php3Functions Ora_Rollback contained
syn keyword php3Functions Ora_Close Ora_ColumnName Ora_ColumnType Ora_Commit contained
syn keyword php3Functions Ora_CommitOff Ora_CommitOn Ora_Error Ora_ErrorCode contained
syn keyword php3Functions Ora_Exec Ora_Fetch Ora_GetColumn Ora_Logoff contained
syn keyword php3Functions Ora_Logon Ora_Open Ora_Parse Ora_Rollback contained
syn keyword php3Functions pg_Close pg_cmdTuples pg_Connect pg_DBname contained
syn keyword php3Functions pg_ErrorMessage pg_Exec pg_FieldIsNull pg_FieldName contained
syn keyword php3Functions pg_FieldNum pg_FieldPrtLen pg_FieldSize contained
syn keyword php3Functions pg_FreeResult pg_GetLastOid pg_Host pg_loclose contained
syn keyword php3Functions pg_locreate pg_loopen pg_loread pg_loreadall contained
syn keyword php3Functions pg_lounlink pg_lowrite pg_NumFields pg_NumRows contained
syn keyword php3Functions pg_Options pg_pConnect pg_Port pg_Result contained
syn keyword php3Functions pg_tty contained
syn keyword php3Functions ereg ereg_replace eregi eregi_replace split contained
syn keyword php3Functions sql_regcase contained
syn keyword php3Functions solid_close solid_connect solid_exec contained
syn keyword php3Functions solid_fetchrow solid_fieldname solid_fieldnum contained
syn keyword php3Functions solid_freeresult solid_numfields solid_numrows contained
syn keyword php3Functions solid_result contained
syn keyword php3Functions snmpget snmpwalk contained
syn keyword php3Functions AddSlashes Chop Chr crypt echo explode flush contained
syn keyword php3Functions htmlspecialchars htmlentities implode join contained
syn keyword php3Functions nl2br Ord print printf QuoteMeta rawurldecode contained
syn keyword php3Functions rawurlencode setlocale sprintf strchr StripSlashes contained
syn keyword php3Functions strlen strtok strrchr strrev strstr contained
syn keyword php3Functions strtolower strtoupper strtr substr ucfirst contained
syn keyword php3Functions md5 soundex parse_str contained
syn keyword php3Functions parse_url urldecode urlencode base64_encode contained
syn keyword php3Functions base64_decode contained
syn keyword php3Functions gettype intval doubleval strval is_array contained
syn keyword php3Functions is_double is_integer is_long is_object is_real contained
syn keyword php3Functions is_string settype eval contained
" Identifier
syn match php3Identifier "$[a-zA-Z_][a-zA-Z0-9_]*" contained contains=php3EnvVar,php3IntVar
" Conditional
syn keyword php3Conditional if else elseif endif switch endswitch contained
" Repeat
syn keyword php3Repeat do for while endwhile contained
" Repeat
syn keyword php3Label case default switch contained
" Statement
syn keyword php3Statement break return continue exit contained
" Keyword
syn keyword php3Keyword global var class contained
" Operator
syn match php3Operator "[-=+%^&|*]" contained
syn match php3Operator "[-+*/%^&|]=" contained
syn match php3Operator "/[^*]"me=e-1 contained
syn match php3Operator "/$" contained
syn match php3Relation "&&" contained
syn match php3Relation "||" contained
syn match php3Relation "[!=<>]=" contained
syn match php3Relation "[<>]" contained
" Include
syn keyword php3Include include contained
" Define
syn keyword php3Define Function cfunction contained
" String
syn region php3String keepend matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=php3Identifier,php3SpecialChar contained
syn region php3String2 keepend matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=php3Identifier,php3SpecialChar contained
" Number
syn match php3Number "-\=\<\d\+\>" contained
" Float
syn match php3Float "\(-\=\<\d+\|-\=\)\.\d\+\>" contained
" SpecialChar
syn match php3SpecialChar "\\[abcfnrtyv\\]" contained
syn match php3SpecialChar "\\\d\{3}" contained contains=php3OctalError
syn match php3SpecialChar "\\x[0-9a-fA-F]\{2}" contained
syn match php3OctalError "[89]" contained
syn match php3ParentError "[)}\]]" contained
" Todo
syn keyword php3Todo TODO Todo todo contained
" Parents
syn region php3Parent1 matchgroup=Delimiter start="(" end=")" contained contains=php3Comment,php3Comment2,php3Functions,php3Identifier,php3Conditional,php3Repeat,php3Label,php3Statement,php3Operator,php3Relation,php3String,php3String2,php3Number,php3Float,php3SpecialChar,php3Parent1,php3Parent2,php3Parent3,php3Include,php3Keyword
syn region php3Parent2 matchgroup=Delimiter start="{" end="}" contained contains=php3Comment,php3Comment2,php3Functions,php3Identifier,php3Conditional,php3Repeat,php3Label,php3Statement,php3Operator,php3Relation,php3String,php3String2,php3Number,php3Float,php3SpecialChar,php3Parent1,php3Parent2,php3Parent3,php3Include,php3Keyword,php3Define
syn region php3Parent3 matchgroup=Delimiter start="\[" end="\]" contained contains=php3Comment,php3Comment2,php3Functions,php3Identifier,php3Conditional,php3Repeat,php3Label,php3Statement,php3Operator,php3Relation,php3String,php3String2,php3Number,php3Float,php3SpecialChar,php3Parent1,php3Parent2,php3Parent3,php3Include,php3Keyword
syn region php3Region1 keepend matchgroup=Delimiter start="<?\(php\)\=" skip=+".*?>.*"+ end="?>" contains=php3Comment,php3Comment2,php3Functions,php3Identifier,php3Conditional,php3Repeat,php3Label,php3Statement,php3Operator,php3Relation,php3Include,php3Define,php3Stringphp3String2,,php3Number,php3Float,php3SpecialChar,php3ParentError,php3Todo,php3Parent1,php3Parent2,php3Parent3,php3Keyword
syn region php3Region2 keepend matchgroup=Delimiter start=+<script language="php">+ end=+</script>+ contains=php3Comment,php3Comment2,php3Functions,php3Identifier,php3Conditional,php3Repeat,php3Label,php3Statement,php3Operator,php3Relation,php3Include,php3Define,php3String,php3String2,php3Number,php3Float,php3SpecialChar,php3ParentError,php3Todo,php3Parent1,php3Parent2,php3Parent3,php3Keyword
if !exists("did_php3_syntax_inits")
let did_php3_syntax_inits = 1
" The default methods for highlighting. Can be overridden later