On 2 October 2013 16:10, Johannes Schlüter <johan...@schlueters.de> wrote: > 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
Heh, pretty good observation! Didn't think about that. Still not buying. $_FORM is derived from "application/x-www-form-urlencoded" resp. "multipart/form-data" and $_QUERY is obvious. > 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. Not only for REST, but in general IMHO, e.g: <form method="POST" action="?see=gotcha"> > > 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) Valid point. Though, with a long enough time frame it could be done. > In case that is ignored please mind other related areas, i.e. > filter_input() to make sure the resulting new language is consistent. Yeah, well, there's a lot attached to that cumbersome naming, e.g. all *_post_* INI settings etc. I should have just resisted proposing that change, but I figured testing for backing was cheap. -- Regards, Mike -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php