From 25a1f788bab17fe1c07c9998e373a061c3420d95 Mon Sep 17 00:00:00 2001 From: Dariusz Ruminski Date: Wed, 11 Dec 2024 00:45:38 +0100 Subject: [PATCH] i love invalid but valid syntax, 'php -l' vs 'token_get_all' --- src/Tokenizer/Transformer/BraceTransformer.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Tokenizer/Transformer/BraceTransformer.php b/src/Tokenizer/Transformer/BraceTransformer.php index 269e208178d..01c018f0b5f 100644 --- a/src/Tokenizer/Transformer/BraceTransformer.php +++ b/src/Tokenizer/Transformer/BraceTransformer.php @@ -195,8 +195,9 @@ private function transformIntoPropertyHookBraces(Tokens $tokens, int $index): vo private function transformIntoCurlyIndexBraces(Tokens $tokens, int $index): void { - // as $arr{index} is illegal since 8.0 - if (\PHP_VERSION_ID >= 8_00_00) { + // as $arr{index} is illegal since 8.4 - ParseError + // (and produces FatalError on 8.0-8.3) + if (\PHP_VERSION_ID >= 8_04_00) { return; }