diff --git a/src/languages/php.js b/src/languages/php.js index ce0af400a8..b3eabb3412 100644 --- a/src/languages/php.js +++ b/src/languages/php.js @@ -63,11 +63,11 @@ export default function(hljs) { const NUMBER = { className: 'number', variants: [ - { begin: `\\b0b[01]+(?:_[01]+)*\\b` }, // Binary w/ underscore support - { begin: `\\b0o[0-7]+(?:_[0-7]+)*\\b` }, // Octals w/ underscore support - { begin: `\\b0x[\\da-f]+(?:_[\\da-f]+)*\\b` }, // Hex w/ underscore support + { begin: `\\b0[bB][01]+(?:_[01]+)*\\b` }, // Binary w/ underscore support + { begin: `\\b0[oO][0-7]+(?:_[0-7]+)*\\b` }, // Octals w/ underscore support + { begin: `\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b` }, // Hex w/ underscore support // Decimals w/ underscore support, with optional fragments and scientific exponent (e) suffix. - { begin: `(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:e[+-]?\\d+)?` } + { begin: `(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?` } ], relevance: 0 }; @@ -103,7 +103,7 @@ export default function(hljs) { 'Directory __PHP_Incomplete_Class parent php_user_filter self static stdClass' }; return { - case_insensitive: true, + case_insensitive: false, keywords: KEYWORDS, contains: [ hljs.HASH_COMMENT_MODE,