On 24/05/2022 21:36, Michael Morris wrote:
I can understand removing this feature since it is a bit confusing, but are there any plans to replace it - say with the template literal syntax of JavaScript? For those needing to refactor having something to switch to would be preferable than having the feature dropped. Or does PHP have some goofy use for backtick that would prevent this from happening?
There already is something to switch to - the "{$foo}" syntax (which is staying) supports everything the "${foo}" syntax does and more. There has been intermittent talk of adding "even better" interpolation of some sort, but without consensus on exactly what the features should be - search on https://externals.io/ to see previous threads.
(And yes, PHP does have a "goofy" use for backtick, inherited from Perl, as an alias for shell_exec. But that's not really relevant because there are plenty of programming languages which have multiple quoting styles without using it, mostly by adding a prefix, e.g. Python's f"...".)
Regards, -- Rowan Tommins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php