Re: HTTP supergloblas and request body/query (was: Parsing PUT data)
| From: | Johannes Schlüter | Date: | Wed, 02 Oct 2013 14:10:23 +0000 |
| Subject: | Re: HTTP supergloblas and request body/query (was: Parsing PUT data) | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-69453@lists.php.net to get a copy of this message | ||
On Wed, 2013-10-02 at 08:59 +0200, Michael Wallner wrote:
> Since ever people are confused by _GET and _POST superglobals,
> because, despite their name, they do not (really) depend on the
> request method. Therefor I propose to phase out $_GET and name it
> $_QUERY and I propose to phase out $_POST and name it $_FORM (I'm not
> 100% confident with the latter yet, though).
The later is certainly misleading. The current naming corresponds to
HTML forms.
<form method="GET"> -> $_GET
<form method="POST"> -> $_POST
I agree that the naming from a HTTP/REST etc. perspective is misleading,
but unless we have a clearly better naming I would resist from changing
these.
Changing these leads to an incompatibility which can not be emulated
(ignoring runkit there is no way for a user to create a custom super
global)
In case that is ignored please mind other related areas, i.e.
filter_input() to make sure the resulting new language is consistent.
johannes