On 14 October 2014 15:25, Mike Dugan <m...@mjdugan.com> wrote:
> On October 14, 2014 at 10:21:34 AM, Ben Ramsey (b...@benramsey.com) wrote:
>
>
> On Oct 14, 2014, at 9:08 AM, Mike Dugan <m...@mjdugan.com> wrote:
>
>> On October 14, 2014 at 10:04:00 AM, Andrea Faulds (a...@ajf.me) wrote:
>>>
>>>
>>> So $_QUERY and $_FORM, then. That sounds about right.
>>>
>>
>> Did I just name a global variable? W00t!
>>
>> Anyhow, yeah neither one is technically 100% correct, but like Andrea
>> said, the majority of usage will be from forms and query strings with
>> parameters. At any rate, it’s makes more sense semantically in the context
>> of what the var actually contains than $_GET and $_POST ever will.
>>
>
> +1
>
> I’m cool with $_QUERY and $_FORM. They make much more sense and don’t try to
> use HTTP verbs, which can confuse the content and semantics of the data they
> contain. Plus, they would just alias $_GET and $_POST, respectively, right?
>
> -Ben
>
>
>
>
>
> That’s my understanding. There’s also some discussion about deriving data
> from $_POST/$_FORM that is intended for use with other HTTP verbs, I’m still
> trying to ascertain exactly what was in mind there (Andrea I think you
> suggested that?)

Well the top of the discussion was suggesting $_PUT and $_DELETE,
which would imply that entity bodies are processed for all HTTP verbs,
the more semantic names for the existing variables came out of this
suggestion (as putting data from other request methods into $_POST
isn't very intuitive).

I'm about +0.5 on both. The name aliases are more semantically
correct, and that's a good thing, but also not entirely necessary.
Processing entity bodies regardless of request method (baring in mind
that this is still content type dependent) is certainly harmless and
may be useful to someone somewhere.

I still think this deflects focus from what would be more useful here:
a native request abstraction *object*, which provides access to all
elements of the *request* without a) splitting them up into distinct
global data stores as the current $_GET, $_POST, $_COOKIE does and b)
mixing request data in with server environment data, as $_SERVER
currently does.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to