Re: [PHP-DEV] What to do with "$array[foobar]"?

2020-01-10 Thread Mike Schinkel
> On Jan 10, 2020, at 2:58 PM, Stanislav Malyshev wrote: > > The first part seems to make sense but I don't think losing "$array[0]" > does... I get the consistency argument but I feel most people would > rather have this useful syntax working and not worry about the fact that > it's

Re: [PHP-DEV] What to do with "$array[foobar]"?

2020-01-10 Thread Stanislav Malyshev
Hi! > I think there's two ways to address this. One is to deprecate and > eventually remove the non-wrapped array interpolation syntax entirely, > requiring people to use the generic "{$array['foobar']}" syntax instead. > For the sake of consistency, I think this would also include deprecating >

Re: [PHP-DEV] What to do with "$array[foobar]"?

2020-01-10 Thread Guilliam Xavier
Hi, On Thu, Jan 9, 2020 at 1:05 PM Nikita Popov wrote: > > [...] we already support > "$string" and "$object->prop", so it is in a way natural that > "$array['key']" is also supported, as the last of the "fundamental" > variable syntaxes. What about rather deprecating "$object->prop" too? The

Re: [PHP-DEV] What to do with "$array[foobar]"?

2020-01-09 Thread Nikita Popov
On Thu, Jan 9, 2020 at 12:12 PM Rowan Tommins wrote: > On Thu, 9 Jan 2020 at 10:48, Nikita Popov wrote: > > > PHP has a couple of legacy string interpolation syntaxes, the most > > egregious being "$array[foobar]". The issue with this syntax is that the > > array key is not quoted, is required

Re: [PHP-DEV] What to do with "$array[foobar]"?

2020-01-09 Thread Rowan Tommins
On Thu, 9 Jan 2020 at 10:48, Nikita Popov wrote: > PHP has a couple of legacy string interpolation syntaxes, the most > egregious being "$array[foobar]". The issue with this syntax is that the > array key is not quoted, is required to be not quoted and is silently > accepted. > > ... > > What do

[PHP-DEV] What to do with "$array[foobar]"?

2020-01-09 Thread Nikita Popov
Hi internals, PHP has a couple of legacy string interpolation syntaxes, the most egregious being "$array[foobar]". The issue with this syntax is that the array key is not quoted, is required to be not quoted and is silently accepted. We've been fighting back against unquoted strings for a long