Skip to content

Commit

Permalink
chore: BraceTransformer - don't touch curly index braces since 8.0, a…
Browse files Browse the repository at this point in the history
…s it's not a valid syntax anymore
  • Loading branch information
keradus committed Dec 9, 2024
1 parent 0fa6fe6 commit d3c756d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Tokenizer/Transformer/BraceTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ private function transformIntoDynamicVarBraces(Tokens $tokens, Token $token, int

private function transformIntoCurlyIndexBraces(Tokens $tokens, Token $token, int $index): void
{
// as $arr{index} is illegal since 8.0
if (\PHP_VERSION_ID >= 8_00_00) {
return;
}

if (!$token->equals('{')) {
return;
}
Expand Down

0 comments on commit d3c756d

Please sign in to comment.