Re: [RFC][Under discussion] Deprecate ${} string interpolation
| From: | BohwaZ | Date: | Sat, 12 Mar 2022 02:11:38 +0000 |
| Subject: | Re: [RFC][Under discussion] Deprecate ${} string interpolation | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-117305@lists.php.net to get a copy of this message | ||
This RFC is confusing two different things:
1. variables inside strings (options 1, 2, 3)
2. dynamic variables names (option 4)
The 4th one is very useful.
$v = ${'param_' . $name};
There is no other practical way to do that, so removing that feature
would mean breaking something useful with no replacement.
Also why break something that works and is used?
If it feels too confusing, you could just deprecate use of the "${...}"
syntax inside strings, but still I don't feel like it's very confusing
and would bring more hassle that it's worth (a bit like the 8.1
depreciation of null for string functions, it's such a pain to deal
with).