Module CodeRay::Scanners::PHP::RE
In: lib/coderay/scanners/php.rb

Constants

PHP_START = / <script\s+[^>]*?language\s*=\s*"php"[^>]*?> | <script\s+[^>]*?language\s*=\s*'php'[^>]*?> | <\?php\d? | <\?(?!xml) /xi
PHP_END = %r! </script> | \?> !xi
HTML_INDICATOR = /<!DOCTYPE html|<(?:html|body|div|p)[> ]/i
IDENTIFIER = /[a-z_\x7f-\xFF][a-z0-9_\x7f-\xFF]*/i
VARIABLE = /\$#{IDENTIFIER}/
OPERATOR = / \.(?!\d)=? | # dot that is not decimal point, string concatenation && | \|\| | # logic :: | -> | => | # scope, member, dictionary \\(?!\n) | # namespace \+\+ | -- | # increment, decrement [,;?:()\[\]{}] | # simple delimiters [-+*\/%&|^]=? | # ordinary math, binary logic, assignment shortcuts [~$] | # whatever =& | # reference assignment [=!]=?=? | <> | # comparison and assignment <<=? | >>=? | [<>]=? # comparison and shift /x

[Validate]