summaryrefslogtreecommitdiff
path: root/pygments/lexers/php.py
diff options
context:
space:
mode:
Diffstat (limited to 'pygments/lexers/php.py')
-rw-r--r--pygments/lexers/php.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/pygments/lexers/php.py b/pygments/lexers/php.py
index 5d1d650d..06aa3718 100644
--- a/pygments/lexers/php.py
+++ b/pygments/lexers/php.py
@@ -57,7 +57,7 @@ class ZephirLexer(RegexLexer):
(r'^(?=\s|/|<!--)', Text, 'slashstartsregex'),
include('commentsandwhitespace'),
(r'\+\+|--|~|&&|\?|:|\|\||\\(?=\n)|'
- r'(<<|>>>?|==?|!=?|->|[-<>+*%&\|\^/])=?', Operator, 'slashstartsregex'),
+ r'(<<|>>>?|==?|!=?|->|[-<>+*%&|^/])=?', Operator, 'slashstartsregex'),
(r'[{(\[;,]', Punctuation, 'slashstartsregex'),
(r'[})\].]', Punctuation),
(r'(for|in|while|do|break|return|continue|switch|case|default|if|else|loop|'
@@ -172,10 +172,10 @@ class PhpLexer(RegexLexer):
(r'\$\{\$+' + _ident_inner + '\}', Name.Variable),
(r'\$+' + _ident_inner, Name.Variable),
(_ident_inner, Name.Other),
- (r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', Number.Float),
- (r'\d+[eE][+-]?[0-9]+', Number.Float),
+ (r'(\d+\.\d*|\d*\.\d+)(e[+-]?[0-9]+)?', Number.Float),
+ (r'\d+e[+-]?[0-9]+', Number.Float),
(r'0[0-7]+', Number.Oct),
- (r'0[xX][a-f0-9]+', Number.Hex),
+ (r'0x[a-f0-9]+', Number.Hex),
(r'\d+', Number.Integer),
(r'0b[01]+', Number.Bin),
(r"'([^'\\]*(?:\\.[^'\\]*)*)'", String.Single),
@@ -191,7 +191,7 @@ class PhpLexer(RegexLexer):
'string': [
(r'"', String.Double, '#pop'),
(r'[^{$"\\]+', String.Double),
- (r'\\([nrt\"$\\]|[0-7]{1,3}|x[0-9a-f]{1,2})', String.Escape),
+ (r'\\([nrt"$\\]|[0-7]{1,3}|x[0-9a-f]{1,2})', String.Escape),
(r'\$' + _ident_inner + '(\[\S+?\]|->' + _ident_inner + ')?',
String.Interpol),
(r'(\{\$\{)(.*?)(\}\})',