File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -979,8 +979,9 @@ public static function polyfillTokenizerConstants(): void
979979 // This variable is necessary to avoid collisions with any other
980980 // libraries which also polyfill T_* constants.
981981 // array_flip()/isset() because in_array() is slow.
982- $ existingConstants = array_flip (get_defined_constants (true )['tokenizer ' ]);
983- foreach ((get_defined_constants (true )['user ' ] ?? []) as $ k => $ v ) {
982+ $ allDefinedConstants = get_defined_constants (true );
983+ $ existingConstants = array_flip ($ allDefinedConstants ['tokenizer ' ]);
984+ foreach (($ allDefinedConstants ['user ' ] ?? []) as $ k => $ v ) {
984985 if (isset ($ k [2 ]) === false || $ k [0 ] !== 'T ' || $ k [1 ] !== '_ ' ) {
985986 // We only care about T_* constants.
986987 continue ;
@@ -996,7 +997,7 @@ public static function polyfillTokenizerConstants(): void
996997 $ polyfillMappingTable = [];
997998
998999 foreach ($ tokensToPolyfill as $ tokenName ) {
999- if (isset (get_defined_constants ( true ) ['tokenizer ' ][$ tokenName ]) === true ) {
1000+ if (isset ($ allDefinedConstants ['tokenizer ' ][$ tokenName ]) === true ) {
10001001 // This is a PHP native token, which is already defined by PHP.
10011002 continue ;
10021003 }
You can’t perform that action at this time.
0 commit comments