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.

And in case it's not clear, the suggestion is that $_POST should be populated on PUT and DELETE methods as well.

--
Rowan Collins
[IMSoP]


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

Reply via email to