zlacker

[parent] [thread] 1 comments
1. alt227+(OP)[view] [source] 2022-12-08 13:14:57
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.

replies(1): >>graype+L6
2. graype+L6[view] [source] 2022-12-08 14:04:04
>>alt227+(OP)
The ${var} syntax is inconsistent with PHP’s own syntax though. Variables are normally referenced with a leading dollar sign, like $var, so if you wanted to make it look like template strings in JS it’d be ${$var} which is over complicated.
[go to top]