On 02.10.2013, at 10:59, Michael Wallner <m...@php.net> 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).
> 
> Further, I propose to remove the POST method restriction for handling
> request bodies and solely rely on the content type to trigger the
> parser(s). (*)
> 
> There are already parsers for application/x-www-form-urlencoded and
> multipart/form-data in the core.  One could think of providing an API
> to add content type handlers from extensions, ext/json may be an
> example, like it is hacked into pecl_http-v2.
> 
> Thoughts, objections, insults?
> 
> (*) We'd probably have to revisit all *post* INI variables, though.

So, that is not one, but three proposals:

1. _GET -> _QUERY, _POST -> _FORM

  I don't think this is really necessary. Names are there historically and 
changing them will break a lot of stuff.
  +0 on aliasing, and soft-deprecation (via documentation) though

2. ignore request-method, trigger body-processing solely on Content-type

  +1. makes sense

3. expose body-parsers via php-level API

  +1. Hell, yes! Something like +1000, actually ;)



-- 
Alexey Zakhlestin
CTO at Grids.by/you
https://github.com/indeyets
PGP key: http://indeyets.ru/alexey.zakhlestin.pgp.asc



Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to