Newsgroups: php.internals
Path: news.php.net
Xref: news.php.net php.internals:77999
Return-Path: <addw@phcomp.co.uk>
Mailing-List: contact internals-help@lists.php.net; run by ezmlm
Delivered-To: mailing list internals@lists.php.net
Received: (qmail 75142 invoked from network); 14 Oct 2014 13:50:50 -0000
Received: from unknown (HELO lists.php.net) (127.0.0.1)
  by localhost with SMTP; 14 Oct 2014 13:50:50 -0000
Authentication-Results: pb1.pair.com smtp.mail=addw@phcomp.co.uk; spf=pass; sender-id=pass
Authentication-Results: pb1.pair.com header.from=addw@phcomp.co.uk; sender-id=permerror
Received-SPF: pass (pb1.pair.com: domain phcomp.co.uk designates 78.32.209.33 as permitted sender)
X-PHP-List-Original-Sender: addw@phcomp.co.uk
X-Host-Fingerprint: 78.32.209.33 freshmint.phcomp.co.uk  
Received: from [78.32.209.33] ([78.32.209.33:42624] helo=mint.phcomp.co.uk)
	by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP
	id BB/7A-26074-73A2D345 for <internals@lists.php.net>; Tue, 14 Oct 2014 09:50:48 -0400
Received: from addw by mint.phcomp.co.uk with local (Exim 4.72)
	(envelope-from <addw@phcomp.co.uk>)
	id 1Xe2Ut-0002g6-DD
	for internals@lists.php.net; Tue, 14 Oct 2014 14:50:43 +0100
Date: Tue, 14 Oct 2014 14:50:43 +0100
To: internals@lists.php.net
Message-ID: <20141014135043.GH11416@phcomp.co.uk>
Mail-Followup-To: internals@lists.php.net
References: <CAKOpQSwS=Xck41sQQyEYGG8L3VHq+fRWjy0dDorbwZaVWMLCow@mail.gmail.com>
 <776669CE-9E8C-4069-9834-C7275CCA0EF4@ajf.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <776669CE-9E8C-4069-9834-C7275CCA0EF4@ajf.me>
Organization: Parliament Hill Computers Ltd
User-Agent: Mutt/1.5.20 (2009-12-10)
Subject: Re: [PHP-DEV] New globals for PUT and DELETE
From: addw@phcomp.co.uk (Alain Williams)

On Tue, Oct 14, 2014 at 01:54:55PM +0100, Andrea Faulds wrote:
> 
> On 14 Oct 2014, at 13:47, Kris Craig <kris.craig@gmail.com> wrote:
> 
> > Hey guys,
> > 
> > Does anybody know why we have $_GET and $_POST, but not $_PUT and
> > $_DELETE?  As far as I can tell, the only way to get these out currently is
> > to parse their values by reading the incoming stream directly.
> > 
> > Is there a reason why we don't want this or is it just that nobody has
> > actually written it yet?
> 
> $_GET and $_POST are really misnomers. $_GET is query string parameters, $_POST is request body data.
> 
> We should just put the request bodies for all requests, not just POST, into $_POST.

Unless I have misunderstood what you are saying ...

as a developer I do want to know the difference between fields in a POST form
and query items on the URL. I will sometimes use them together, eg:

    <form action="?context=something" method="post" >
    ...

and specifically check $_GET['context'] - there might be a $_POST['context'] but
that is treated completely differently.

-- 
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256  http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php
#include <std_disclaimer.h>