You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?php# simple syntax# OK"$foo[$index_var]";
# simple syntax with explicit name boundaries with curly brackets# Not OK: prettier swallows the dollar sign from $index_var"${foo[$index_var]}";
# complex (curly) syntax# OK"{$foo[$index_var]}";
Output:
<?php# simple syntax# OK"$foo[$index_var]";
# simple syntax with explicit name boundaries with curly brackets# Not OK: prettier swallows the dollar sign from $index_var"${foo[index_var]}";
# complex (curly) syntax# OK"{$foo[$index_var]}";
In a double quoted string using the so called simple syntax with explicit variable boundaries given by curly brackets prettier swallows the dollar sign from a variable nested inside the boundaries.
The text was updated successfully, but these errors were encountered:
@prettier/plugin-php v0.19.4
Playground link
Input:
Output:
In a double quoted string using the so called simple syntax with explicit variable boundaries given by curly brackets prettier swallows the dollar sign from a variable nested inside the boundaries.
The text was updated successfully, but these errors were encountered: