From 624725200dea271c0a52b593c14140d0c84c4e1c Mon Sep 17 00:00:00 2001 From: jrfnl Date: Tue, 11 May 2021 03:23:11 +0200 Subject: [PATCH] 4.0 | Tokenizer/PHP: defer to predefined regex --- src/Tokenizers/PHP.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tokenizers/PHP.php b/src/Tokenizers/PHP.php index 99b85478d8..95de0aba21 100644 --- a/src/Tokenizers/PHP.php +++ b/src/Tokenizers/PHP.php @@ -1193,7 +1193,7 @@ protected function tokenize($string) if ($tokenIsArray === true && ($token[0] === T_STRING - || preg_match('`^[a-zA-Z_\x80-\xff]`', $token[1]) === 1) + || preg_match(self::PHP_LABEL_REGEX, $token[1]) === 1) ) { // Get the next non-empty token. for ($i = ($stackPtr + 1); $i < $numTokens; $i++) {