zlacker

[return to "PHP 8.2"]
1. Aachen+24[view] [source] 2022-12-08 12:53:44
>>TimWol+(OP)
Deprecated variables in strings? Or just when using the curly braces syntax for some reason? Unlike with every other entry there's no link but this sounds like the biggest change since PHP 4. Anyone know where to find more info?
◧◩
2. jorams+s4[view] [source] 2022-12-08 12:57:16
>>Aachen+24
PHP string interpolation has 3 possible syntaxes: $var, {$var} and ${var}. The last one is now deprecated. I've never seen it used in the wild, and it has some odd limitations. It's discussed in the RFC[1].

[1]: https://wiki.php.net/rfc/deprecate_dollar_brace_string_inter...

◧◩◪
3. alt227+67[view] [source] 2022-12-08 13:14:57
>>jorams+s4
Seems strange to remove it when Javascript has introduced it with backtick strings like:

`words ${var} more words`

I thought we would start seeing more usage of this in PHP to make things more consistent.

[go to top]