Re: behavior of translating dot in the query variable name into underscore character
| From: | Ferenc Kovacs | Date: | Fri, 12 Aug 2011 15:26:16 +0000 |
| Subject: | Re: behavior of translating dot in the query variable name into underscore character | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-54543@lists.php.net to get a copy of this message | ||
2011/8/12 Johannes Schlüter <johannes@schlueters.de>:
> Hi,
>
> On Fri, 2011-08-12 at 15:48 +0200, Ferenc Kovacs wrote:
>> if we would both provide the foo_bar and foo.bar:
>>
>> - if your code expects foo.bar to be foo_bar, it's there.
>> - if you expect foo.bar, it's also fine.
>> - if you did a workaround in the past (parse the query string
>> manually), that would also work, in the worst case, you would
>> overwrite the foo.bar with the same value.
>
> ... and we make it complicated for everybody iterating over the array to
> do some work on all elements.
>
please explain!
your foreach would work exactly in the same way.
your logic would only break, if you blow up on unexpected request
variables, which is much less frequent usecase imo. (as I mentioned
maybe for some really strict request validation)
--
Ferenc Kovács
@Tyr43l - http://tyrael.hu