+
    TBi3                         R t ^ RIt^ RIHtHtHtHtHtHtH	t	H
t
HtHt ^ RIHtHtHtHtHtHtHtHtHtHt ^ RIHtHtHt . ROt ! R R]4      t ! R	 R]4      t ! R
 R]4      tR# )z
pygments.lexers.php
~~~~~~~~~~~~~~~~~~~

Lexers for PHP and related languages.

:copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
N)
Lexer
RegexLexerincludebygroupsdefaultusingthiswordsdo_insertionsline_re)
TextCommentOperatorKeywordNameStringNumberPunctuationOtherGeneric)get_bool_optget_list_optshebang_matchesZephirLexerPsyshConsoleLexerPhpLexerc                   L   ] tR t^tRtRtRtR.tR.tRt	. R#Ot
. R$Ot]P                  ]P                  ,          tRR]3R	]P$                  3R
]P&                  3.R]! R4      R]P,                  R3R]R3]! R4      .RR]R3.RR]R3]! R4      R]R3R]R3R]3R]R3R]P6                  R3R]P8                  3R]P:                  3R]P>                  3R]P@                  3R]!PD                  3R]!PF                  3R]!PH                  3R]PJ                  3R ]P$                  3./t&R!t'R"# )%r   z{
For Zephir language source code.

Zephir is a compiled high level language aimed
to the creation of C-extensions for PHP.
Zephirzhttp://zephir-lang.com/zephirz*.zepz2.0commentsandwhitespace\s+//.*?\n	/\*.*?\*/slashstartsregexz3/(\\.|[^[/\\\n]|\[(\\.|[^\]\\\n])*])+/([gim]+\b|\B)#pop/badregexz\nrootz	^(?=\s|/)zC\+\+|--|~|&&|\?|:|\|\||\\(?=\n)|(<<|>>>?|==?|!=?|->|[-<>+*%&|^/])=?z[{(\[;,]z[})\].]z(for|in|while|do|break|return|continue|switch|case|default|if|else|loop|require|inline|throw|try|catch|finally|new|delete|typeof|instanceof|void|namespace|use|extends|this|fetch|isset|unset|echo|fetch|likely|unlikely|empty)\bz(var|let|with|function)\bz(abstract|boolean|bool|char|class|const|double|enum|export|extends|final|native|goto|implements|import|int|string|interface|long|ulong|char|uchar|float|unsigned|private|protected|public|short|static|self|throws|reverse|transient|volatile|readonly)\bz(true|false|null|undefined)\bzm(Array|Boolean|Date|_REQUEST|_COOKIE|_SESSION|_GET|_POST|_SERVER|this|stdClass|range|count|iterator|window)\bz[$a-zA-Z_][\w\\]*z%[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?z0x[0-9a-fA-F]+z[0-9]+z"(\\\\|\\[^\\]|[^"\\])*"z'(\\\\|\\[^\\]|[^'\\])*' N)fetchechoissetempty)bitbitsstring)(__name__
__module____qualname____firstlineno____doc__nameurlaliases	filenamesversion_addedzephir_keywordszephir_typereDOTALL	MULTILINEflagsr   r   Single	Multiliner   r   Regexr   r   r   r   DeclarationReservedConstantr   Builtinr   r   FloatHexIntegerDoubletokens__static_attributes__r(       8/usr/lib/python3.14/site-packages/pygments/lexers/php.pyr   r      s    D
#CjG	IM9O+KII$E 	 TN(7,,-"

 	+,%||V58V$FO
 	D&!
 	4!34+,45=?QS+'9:% "#57 *7+>+>@RS/ 180@0@B .w/?/?@<<) "4::.5v||D

+'(&--8(&--83
!+FrM   c                   B   a  ] tR t^Wt o RtRtRtR.tRtR t	R t
RtV tR	# )
r   u   
For PsySH console output, such as:

.. sourcecode:: psysh

    >>> $greeting = function($name): string {
    ...     return "Hello, {$name}";
    ... };
    => Closure($name): string {#2371 …3}
    >>> $greeting('World')
    => "Hello, World"
zPsySH console session for PHPzhttps://psysh.org/psyshz2.7c                >    R VR&   \         P                  ! V 3/ VB  R# )TstartinlineN)r   __init__)selfoptionss   &,rN   rS   PsyshConsoleLexer.__init__i   s    !%t'w'rM   c              #  2  "   \        R/ V P                  B pR p. p\        P                  ! V4       EF-  pVP	                  4       pVP                  R4      '       g   VP                  R4      '       dG   VP                  \        V4      ^ \        P                  VR,          3.34       W6R,          ,          pK  VP                  4       R8X  d@   VP                  \        V4      ^ \        P                  R3.34       W6R,          ,          pK  V'       d'   \        WBP                  V4      4       Rj  xL
  R p. pVP                  4       \        P                  V3x  EK0  	  V'       d&   \        VVP                  V4      4       Rj  xL
  R# R#  L_ L
5i)	 z>>> z... :N   N:rY   NNz...:   NNNr(   )r   rU   r   finditergroup
startswithappendlenr   Promptrstripr
   get_tokens_unprocessedstartOutput)rT   textphplexercurcode
insertionsmatchlines   &&     rN   rb   (PsyshConsoleLexer.get_tokens_unprocessedm   sa    +dll+
%%d+E;;=Dv&&$//&*A*A!!3w<%&R$A#B#D E8#%'!!3w<%&$>#?#A B8#,"$C$CG$L N N N G!#JkkmW^^T99! ," $Z%-%D%DW%MO O O NOs7   A1F4B!FF3F47F,F
F	FFr(   N)r0   r1   r2   r3   r4   r5   r6   r7   r9   rS   rb   rL   __classdictcell____classdict__s   @rN   r   r   W   s3      +D
CiGM(O OrM   c                     a  ] tR t^t o RtRtRt. RMOt. RNOtR.t	Rt
RtRt]P                  ]P                  ,          ]P                   ,          tR	R
]P&                  R3R]3R]3.R. R]P&                  R3NR],           R,           ]! ]]]P.                  ]]P.                  ]]4      3NR]3NR]R3NR]P4                  3NR]P4                  3NR]P6                  3NR]P8                  3NR]P6                  3NR],           R,           ]! ]]]P>                  4      3NR]3NR]3NR]3NR]! ] ]] 4      3NR]! ] ]4      R 3NR!]! ] ]4      3NR"]! ] ]]]4      R#3NR$],           R,           ]! ] ]]PB                  4      3NR%] 3NR&] PB                  3N]"! R'4      NR(]PF                  R)3NR*],           ]PF                  3N]]P(                  3NR+]$PJ                  3NR,]$PJ                  3NR-]$PL                  3NR.]$PN                  3NR/]$PP                  3NR0]$PR                  3NR1]P4                  3NR2]PT                  3NR3]PV                  R43NR)R5]PF                  R3]"! R4      .R6],! ROR7R87      ]PZ                  P\                  3.R'],! RPR7R87      ]PB                  3.R ]]P^                  R3.R#]"! R64      ]]PZ                  R3]0! R4      .R4R3]PV                  R3R9]PV                  3R:]Pb                  3R;],           R<,           ],           R=,           ]Pd                  3R>]! ]Pd                  ]3! ]4R?R@7      ]Pd                  4      3RA]! ]Pd                  ]3! ]4R?R@7      ]Pd                  4      3RB]! ]Pd                  ]PF                  ]Pd                  4      3RC]PV                  3.RRD]R3RE]RF3]]Pj                  3]"! R4      .RFRG]R3]"! R4      ./
t6RH t7RI t8RJ t9RKt:V t;RL# )Qr   a  
For PHP source code.
For PHP embedded in HTML, use the `HtmlPhpLexer`.

Additional options accepted:

`startinline`
    If given and ``True`` the lexer starts highlighting with
    php code (i.e.: no starting ``<?php`` required).  The default
    is ``False``.
`funcnamehighlighting`
    If given and ``True``, highlight builtin function names
    (default: ``True``).
`disabledmodules`
    If given, must be a list of module names whose function names
    should not be highlighted. By default all modules are highlighted
    except the special ``'unknown'`` module that includes functions
    that are known to php but are undocumented.

    To get a list of allowed modules have a look into the
    `_php_builtins` module:

    .. sourcecode:: pycon

        >>> from pygments.lexers._php_builtins import MODULES
        >>> MODULES.keys()
        ['PHP Options/Info', 'Zip', 'dba', ...]

    In fact the names of those modules match the module names from
    the php documentation.
PHPzhttps://www.php.net/phpz
text/x-phprX   z1(?:[\\_a-z]|[^\x00-\x7f])(?:[\\\w]|[^\x00-\x7f])*z+(?:[_a-z]|[^\x00-\x7f])(?:\w|[^\x00-\x7f])*r'   z	<\?(php)?z[^<]+<z\?>r$   z(<<<)([\'"]?)(z)(\2\n.*?\n\s*)(\3)(;?)(\n)r    z#\[	attributez#.*?\nr!   z/\*\*/z/\*\*.*?\*/r"   z(->|::)(\s*)()z[~!%^&*+=|:.<>/@-]+z\?z[\[\]{}();,]+z(new)(\s+)(class)\bz(class)(\s+)	classnamez(function)(\s*)(?=\()z(function)(\s+)(&?)(\s*)functionnamez(const)(\s+)(a  (and|E_PARSE|old_function|E_ERROR|or|as|E_WARNING|parent|eval|PHP_OS|break|exit|case|extends|PHP_VERSION|cfunction|FALSE|print|for|require|continue|foreach|require_once|declare|return|default|static|do|switch|die|stdClass|echo|else|TRUE|elseif|var|empty|if|xor|enddeclare|include|virtual|endfor|include_once|while|endforeach|global|endif|list|endswitch|new|endwhile|not|array|E_ALL|NULL|final|php_user_filter|interface|implements|public|private|protected|abstract|clone|try|catch|throw|this|use|namespace|trait|yield|finally|match)\bz(true|false|null)\bmagicconstantsz\$\{variablevariablez\$+z"(\d+\.\d*|\d*\.\d+)(e[+-]?[0-9]+)?z\d+e[+-]?[0-9]+z0[0-7]+z0x[a-f0-9]+z\d+z0b[01]+z'([^'\\]*(?:\\.[^'\\]*)*)'z`([^`\\]*(?:\\.[^`\\]*)*)`"r/   z\}
magicfuncsz\b)suffixz	[^{$"\\]+z'\\([nrt"$\\]|[0-7]{1,3}|x[0-9a-f]{1,2})z\$z(\[\S+?\]|->z)?z(\{\$\{)(.*?)(\}\})T)_startinlinez(\{)(\$.*?)(\})z(\$\{)(\S+)(\})z[${\\]z\]z\(attributeparamsz\)c                   \        VR R4      V n        \        VRR.4      V n        \        VRR4      V n        RV9   d   VP                  R4      V n        \        4       V n        V P                  '       dM   ^ RIH	p VP                  4        F2  w  r4W0P                  9  g   K  V P                  P                  V4       K4  	  \        P                  ! V 3/ VB  R# )	funcnamehighlightingTdisabledmodulesunknownrR   Fr|   )MODULESN)r   r   r   r   rR   popset
_functionspygments.lexers._php_builtinsr   itemsupdater   rS   )rT   rU   r   keyvalues   &,   rN   rS   PhpLexer.__init__(  s    $0+T%3!+& 5'F W$&{{>:D %$$$=%mmo
222OO**51 . 	D,G,rM   c              #    "   R .pV P                   '       d   VP                  R4       \        P                  ! WV4       FG  w  r4pV\        P
                  J d(   WPP                  9   d   V\        P                  V3x  KA  W4V3x  KI  	  R# 5i)r'   rq   N)rR   r^   r   rb   r   r   r   rF   )rT   re   stackindextokenr   s   &&    rN   rb   PhpLexer.get_tokens_unprocessed<  sx     LL11$eD  E%

"OO+u44%% Es   BBc                ~    \        V R 4      '       d   R# Rp\        P                  ! RV 4      '       d
   VR,          pV# )rq   Tg        z
<\?(?!xml)g333333?)r   r<   search)re   rvs   & rN   analyse_textPhpLexer.analyse_textH  s6    4((99]D))#IB	rM   )r   r   r   rR   N)rq   php3php4php5)z*.phpz
*.php[345]z*.inc)__construct
__destruct__call__callStatic__get__set__isset__unset__sleep__wakeup
__toString__invoke__set_state__clone__debugInfo)__LINE____FILE____DIR____FUNCTION__	__CLASS__	__TRAIT__
__METHOD____NAMESPACE__)<r0   r1   r2   r3   r4   r5   r6   r7   r8   	mimetypesr9   _ident_inner_ident_nonsr<   
IGNORECASEr=   r>   r?   r   Preprocr   r   r   	Delimiterr   r   r@   rA   Docr   r   	Attributer   rE   r   Variabler   rG   OctrH   rI   BinBacktickrJ   r	   FunctionMagicClassr   EscapeInterpolr   r   	DecoratorrK   rS   rb   r   rL   rl   rm   s   @rN   r   r      ss    @ D
 C-G0IIM HL@KMMBII%4E7??E2u5M

 	 3
W__f-3
,/MMfff&6&6@P@P!4)*3

 TN3
 [+.3
 '3
 (3
 ))*3
 VZZ(3
 7,,-3
 +c1hdnn573
  $X.!3
" H#3
$ {+%3
& $XgtW%EF'3
( hw5{C)3
* &x'>?+3
, )gtXt4nF-3
0 ,s2gtT]]3513
4
! #*
+53
J $W%5%56K3
L $%M3
N dmm%78O3
P l"DMM2Q3
R 4::&S3
T 3FLLAU3
V  .W3
X $Y3
Z VZZ([3
\ V^^$]3
^ $_3
` +FMM:a3
b +FOO<c3
d 6==(+e3
h 	DMM6*EN
 	 : CHI ]]  	"
 	 =  ]]	
 	4::v.
 	L!4==&1FO

 	6==&)6==)7G[ ?2[@4G__#foouT'Eoo'(  foouT'Eoo'(  foot}}fooFH&
  	K(K!234>>*EN	
 	K(EN
YpFd-(
& rM   )r   r   r   ) r4   r<   pygments.lexerr   r   r   r   r   r   r   r	   r
   r   pygments.tokenr   r   r   r   r   r   r   r   r   r   pygments.utilr   r   r   __all__r   r   r   r(   rM   rN   <module>r      sb    
/ / /( ( ( E E
:>* >B-O -O`Gz GrM   