note 95448 deleted from function.parse-str by danbrown
| From: | danbrown@php.net | Date: | Mon, 04 Jan 2010 16:03:10 +0000 |
| Subject: | note 95448 deleted from function.parse-str by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-164611@lists.php.net to get a copy of this message | ||
Note Submitter: uramihsayibok, gmail, com
----
Re: converting periods to underscores (julien 22-Jun-2009)
(Also mentioned here by kermodebear 08-Aug-2007, Anon 17-Jun-2004, and surely in countless other
places)
This is probably a holdover from the days of register_globals, may they never haunt us again.
A period is not allowed in a variable name, so what happened then was they were converted to
underscores: "foo.bar=baz" would result in $foo_bar == "baz".
It's most noticeable with image submit buttons. An image button named "foo" will
create "foo.x" and "foo.y" (the X,Y coordinates of the mouse click on the image)
which PHP translates to foo_x and foo_y.
Perhaps there will be an INI setting in the future to disable this annoying behavior?