note 95448 added to function.parse-str
| From: | uramihsayibok at osu1 dot php dot net | Date: | Mon, 04 Jan 2010 07:46:29 +0000 |
| Subject: | note 95448 added to function.parse-str | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-164582@lists.php.net to get a copy of this message | ||
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?
----
Server IP: 64.71.164.2
Probable Submitter: 75.172.105.165
----
Manual Page -- http://www.php.net/manual/en/function.parse-str.php
Edit -- https://master.php.net/note/edit/95448
Del: integrated -- https://master.php.net/note/delete/95448/integrated
Del: useless -- https://master.php.net/note/delete/95448/useless
Del: bad code -- https://master.php.net/note/delete/95448/bad+code
Del: spam -- https://master.php.net/note/delete/95448/spam
Del: non-english -- https://master.php.net/note/delete/95448/non-english
Del: in docs -- https://master.php.net/note/delete/95448/in+docs
Del: other reasons-- https://master.php.net/note/delete/95448
Reject -- https://master.php.net/note/reject/95448
Search -- https://master.php.net/manage/user-notes.php