From 123a5e35263d17b144a6ba23b5342477764ea92c 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 cb58661455..44ede64607 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++) {