On 10/14/2014 11:16 AM, Rowan Collins wrote:
> On 14/10/2014 17:18, Rasmus Lerdorf wrote:
>> I think 20+ years of history has proven this to be a non-issue. Of all
>> the things that people get confused by in PHP, $_GET/$_POST are right
>> near the bottom of the list.
> 
> The popularity of REST is what has changed this. Until people started
> writing RESTful APIs, only two HTTP request types were in common use.
> Nobody was confused about where PUT method data would end up, because
> nobody processed any PUT methods.
> 
>> It makes no sense to me to make $_BODY an alias for $_POST. $_POST
>> implies the default body encoding that a broswer performs on a POST
>> request. Making an alias called $_BODY that doesn't contain the body of
>> a request unless it is "POST"-encoded would be super confusing.
> 
> The encoding has no relationship with the request type, even in browsers
> - the default encoding of a POST form is actually the same encoding used
> to produce a URL form a GET form.

Sure, but $_GET/$_POST do. They were not named to match HTTP primitives.
They were named to match form methods. As in form method="get" and
method="post". And here the default encoding the browsers use for these
two methods definitely matter.

-Rasmus


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

Reply via email to