Re: Re: [Discussion] Dots and spaces in GPC variable names
| From: | Lauri Kenttä | Date: | Mon, 15 May 2017 13:55:17 +0000 |
| Subject: | Re: Re: [Discussion] Dots and spaces in GPC variable names | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-99042@lists.php.net to get a copy of this message | ||
On 2017-05-03 13:55, Andrey Andreev wrote:
Hi Andrea, On Tue, May 2, 2017 at 11:08 PM, Andrea Faulds <ajf@ajf.me> wrote:Someone has to say this ;), so: Why not a new API? You could provide access to parameters with same name instead of overwriting the existing; consider a=0&a[]=1&a[0]=2&a=3, where each part overwrites the previous one and the result is a=3. You could provide support for JSON input. You could create all kinds of crazy bloat. -- Lauri KenttäHey Andrey, Andrey Andreev wrote:Sounds hacky to me. Plus, a function call means we can't have environments that do it by default pre-8.0, and that in turn means a harder migration. But hey, as long as we get rid of the mangling, I wouldn't really care that much! :) Cheers, Andrey.I'm not surprised by the suggestion for targeting 8.0, but perhaps we could think of a way to conditionally disable the mangling in 7.x and then remove it entirely in 8? I hate to say INI directives, but that's surely one way for a smoother transition.Another approach I'd previously thought of was to keep in memory whatever information would be needed to undo the mangling process for the superglobals, and provide a function which would undo it. Then in 8.x it could become a no-op.