Re: [PHP-DEV] [RFC][Under discussion] Deprecate ${} string interpolation

2022-03-17 Thread Alain D D Williams
On Thu, Mar 17, 2022 at 06:18:38PM +0100, Ilija Tovilo wrote: > Hi everyone > > I have tried to address all the feedback I've received for the RFC to > deprecate the ${} string interpolation. > https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation Could you please add, for the

Re: [PHP-DEV] [RFC][Under discussion] Deprecate ${} string interpolation

2022-03-17 Thread Ilija Tovilo
Hi everyone I have tried to address all the feedback I've received for the RFC to deprecate the ${} string interpolation. https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation * I have added instructions on how to migrate from option 3/4 to option 2 * I have analized the top 1000

Re: [PHP-DEV] [RFC][Under discussion] Deprecate ${} string interpolation

2022-03-15 Thread Guilliam Xavier
Hi Mike, Lynn, and Kamil; I feel like this sub-thread has derailed from the initial topic... As already said, this RFC is *not* about the general "variable variables" feature, but about *the `"${...}"` syntax inside interpolated strings* (i.e. double-quoted or heredoc), which can be rewritten to

Re: [PHP-DEV] [RFC][Under discussion] Deprecate ${} string interpolation

2022-03-14 Thread Mark Baker
On 12/03/2022 15:23, Ilija Tovilo wrote: You're absolutely right. I will attempt to gather some numbers. For option 3, I also think "not widely used" is just plain wrong. As for option 4, I'm fairly confident it only exists by accident 95% of the time. Like Andreas, this is my biggest concern

Re: [PHP-DEV] [RFC][Under discussion] Deprecate ${} string interpolation

2022-03-14 Thread Mike Schinkel
> On Mar 14, 2022, at 3:20 PM, Lynn wrote: > > On Mon, Mar 14, 2022 at 8:04 PM Mike Schinkel > wrote: > > Variable variables provide functionality[1] that if removed would force major > rewrites of PHP applications that were architected in a way that depends on >

Re: [PHP-DEV] [RFC][Under discussion] Deprecate ${} string interpolation

2022-03-14 Thread Lynn
On Mon, Mar 14, 2022 at 8:04 PM Mike Schinkel wrote: > > Variable variables provide functionality[1] that if removed would force > major rewrites of PHP applications that were architected in a way that > depends on that functionality. > And while probably between 90% and 99% of the time when

Re: [PHP-DEV] [RFC][Under discussion] Deprecate ${} string interpolation

2022-03-14 Thread Mike Schinkel
> On Mar 12, 2022, at 5:44 AM, Lynn wrote: > > Variable variables should be removed from PHP asap. It's 2022 and I still > encounter bugs due to this "working" in legacy applications. > On Mar 12, 2022, at 5:48 AM, Kamil Tekiela wrote: > > +1 on removing variable variables as soon as

Re: [PHP-DEV] [RFC][Under discussion] Deprecate ${} string interpolation

2022-03-14 Thread BohwaZ
> > The 4th one is very useful. > > > > $v = ${'param_' . $name}; > > Like Rowan mentioned, the RFC does not propose to deprecate variable > variables, just variable variables as a form of string interpolation. > You'll still be able to use variable variables, even in strings, like > noted

Re: [PHP-DEV] [RFC][Under discussion] Deprecate ${} string interpolation

2022-03-12 Thread Ilija Tovilo
Hi everyone, thanks for the feedback! I'll be responding to everyone in the same e-mail to minimize noise. --- Hi Rowan > I presume the intent here is that the engine will generate an > E_DEPRECATED each time such a string is encountered. Do you know yet if > that will be easy to implement? I

Re: [PHP-DEV] [RFC][Under discussion] Deprecate ${} string interpolation

2022-03-12 Thread Rowan Tommins
On 12 March 2022 11:30:15 GMT, BohwaZ wrote: >> The RFC is *only* about how variables are interpolated *inside quoted >> strings*. > >Then it doesn't seem clear in the RFC that it's limited to variables >inside strings In not quite sure how you missed it, because the word "string" is there in

Re: [PHP-DEV] [RFC][Under discussion] Deprecate ${} string interpolation

2022-03-12 Thread Aleksander Machniak
On 12.03.2022 09:42, Andreas Heigl wrote: First of all it would make it much easier for me to see what impact this RFC has if there were any numbers in it of how many large-scale repositories on for example github are affected by this. I just checked my projects' vendor folders and I found a

Re: [PHP-DEV] [RFC][Under discussion] Deprecate ${} string interpolation

2022-03-12 Thread BohwaZ
> The RFC is *only* about how variables are interpolated *inside quoted > strings*. Then it doesn't seem clear in the RFC that it's limited to variables inside strings, maybe it should be made clearer that it's only proposed to deprecate that syntax inside strings, and not the variables variables

Re: [PHP-DEV] [RFC][Under discussion] Deprecate ${} string interpolation

2022-03-12 Thread Rowan Tommins
On 12 March 2022 02:11:38 GMT, BohwaZ wrote: >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

Re: [PHP-DEV] [RFC][Under discussion] Deprecate ${} string interpolation

2022-03-12 Thread Kamil Tekiela
+1 on removing variable variables as soon as possible.

Re: [PHP-DEV] [RFC][Under discussion] Deprecate ${} string interpolation

2022-03-12 Thread Lynn
On Sat, Mar 12, 2022 at 3:11 AM BohwaZ wrote: > 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}; > Please don't ever ever ever write code like that!

Re: [PHP-DEV] [RFC][Under discussion] Deprecate ${} string interpolation

2022-03-12 Thread Andreas Heigl
Hey Ilija. On 11.03.22 18:13, Ilija Tovilo wrote: Hi everyone It's been a while. Hope you are doing well. Last year I sent an e-mail to the mailing about the current state of string interpolation in PHP. I have now created an RFC to better explain the current behavior and why it would make

Re: [PHP-DEV] [RFC][Under discussion] Deprecate ${} string interpolation

2022-03-11 Thread BohwaZ
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

Re: [PHP-DEV] [RFC][Under discussion] Deprecate ${} string interpolation

2022-03-11 Thread Rowan Tommins
On 11/03/2022 17:13, Ilija Tovilo wrote: https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation Hi Ilija, Thanks for progressing with this, and making a clear case why these syntaxes are confusing and redundant. I presume the intent here is that the engine will generate an

[PHP-DEV] [RFC][Under discussion] Deprecate ${} string interpolation

2022-03-11 Thread Ilija Tovilo
Hi everyone It's been a while. Hope you are doing well. Last year I sent an e-mail to the mailing about the current state of string interpolation in PHP. I have now created an RFC to better explain the current behavior and why it would make sense to deprecate/remove some of it.