Re: behavior of translating dot in the query variable name into underscore character
| From: | Mats Lindh | Date: | Fri, 12 Aug 2011 13:12:34 +0000 |
| Subject: | Re: behavior of translating dot in the query variable name into underscore character | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-54535@lists.php.net to get a copy of this message | ||
On Fri, Aug 12, 2011 at 1:23 PM, Kalle Sommer Nielsen <kalle@php.net> wrote:
>> For BC reasons there is no way we can simply remove it. Old code might
>> rely on it without relying on register_globals.
> Although we could assign both, but I guess that would eat more memory
> that it might actually benefit.
Would it be possible to assign it as a reference and change the
reference on the first write (similar to copy-on-write)? In that case
I'd suggest doing something similar to:
* Assign all variables to their provided name
* Assign a reference as the "cleaned" version of their name if there
isn't already an existing version of the clean name in the map
Quite a few services use "." in their query string variables (such as
Solr, for one), and the mangling of the query string names requires
you to parse the query string yourself if you want to write a front
end service accepting the same kind of API.
--
Mats Lindh