Re: New globals for PUT and DELETE

From: Date: Tue, 14 Oct 2014 13:47:01 +0000
Subject: Re: New globals for PUT and DELETE
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-77995@lists.php.net to get a copy of this message
--  Mike Dugan mike@mjdugan.com On October 14, 2014 at 9:42:47 AM, Kris Craig (kris.craig@gmail.com) wrote: On Tue, Oct 14, 2014 at 6:25 AM, 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.  > --  > Andrea Faulds  > http://ajf.me/  >  >  Removing or renaming $_GET and $_POST would also create confusion and  almost certainly cause widespread BC breakage on a pretty massive scale.  And there's really no gain to offset that. So that just leaves us with  either continuing to have two REST methods but not the others or add a  $_PUT and a $_DELETE, even if they just alias to php://input again.  --Kris  How are these RESTful methods? $_GET accepts query strings, that’s not part of the spec for RESTful GET requests unless I missed something. I also don’t see the worldwide breakage and confusion that would be caused - no one is proposing to drop $_GET and $_POST but rather to create more semantic aliases for them. — Mike Dugan mike@mjdugan.com

« previous php.internals (#77995) next »