Re: New globals for PUT and DELETE
| From: | Chris Wright | Date: | Tue, 14 Oct 2014 13:30:31 +0000 |
| Subject: | Re: New globals for PUT and DELETE | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-77989@lists.php.net to get a copy of this message | ||
On 14 October 2014 14:25, Andrea Faulds <ajf@ajf.me> wrote:
>
> On 14 Oct 2014, at 14:23, Andrey Andreev <narf@devilix.net> wrote:
>
>> That being said, from a purely semantic prospective, both $_GET and
>> $_POST should be tossed - yes. In reality, you can't do that because
>> virtually all PHP applications use them. But this is no reason to add
>> even more global vars with such misleading ... meanings.
>
> Let’s add $_REQUEST_BODY and $_QUERY_STRING and make them aliases of $_GET and $_POST then.
> Because they’re aliases (by-reference superglobals), there’s no additional memory consumption,
> but we finally have saner names.
$_BODY and $_QUERY would be better, IMHO. The brevity would be
consistent both historically and with other existing superglobal
names, and at least with $_QUERY_STRING the data is not a string.
I suggested this a while ago, people didn't like the idea, and I'm not
sure I do any more, either. We'd do much better focusing on creating a
standard native request *object* which provides clean access to this
data, and other things that are clumsy at the moment, such as request
headers.