simple_to_complex_string_variable
Converts explicit variables in double-quoted strings and heredoc syntax from simple to complex format (${ to {$).
${
{$
Doesn’t touch implicit variables. Works together nicely with explicit_string_variable.
explicit_string_variable
--- Original +++ New <?php $name = 'World'; -echo "Hello ${name}!"; +echo "Hello {$name}!";
--- Original +++ New <?php $name = 'World'; echo <<<TEST -Hello ${name}! +Hello {$name}! TEST;
The rule is part of the following rule sets:
@PHP82Migration
@PhpCsFixer
@Symfony