Using ${expr} (variable variables) in strings is deprecated, use {${expr}} instead¶
Description¶
The interpolation syntax ${expr}
is deprecated. It takes an expression (here, a concatenation) to build the name of the variable that is used in the end. It is recommended to update the syntax with a compatible one or use concatenation, before the syntax is removed.
Example¶
<?php
$foo = 'bar';
var_dump();
?>
Solutions¶
Use {} instead.
Use concatenation instead.