Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78018 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6436 invoked from network); 14 Oct 2014 14:53:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Oct 2014 14:53:56 -0000 Authentication-Results: pb1.pair.com header.from=are.you.winning@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=are.you.winning@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.172 as permitted sender) X-PHP-List-Original-Sender: are.you.winning@gmail.com X-Host-Fingerprint: 209.85.216.172 mail-qc0-f172.google.com Received: from [209.85.216.172] ([209.85.216.172:41540] helo=mail-qc0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F5/D4-18603-3093D345 for ; Tue, 14 Oct 2014 10:53:55 -0400 Received: by mail-qc0-f172.google.com with SMTP id o8so6877098qcw.31 for ; Tue, 14 Oct 2014 07:53:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=Ev6fG46LuuDmx7moNIwinD7WHhnYT+ymjMmbyXtJWEM=; b=wgW4PKC97lg9SHF4raoVj2g1VEOPf1WbuVye1FWoU34xgkvWIFjWZZOE3QbjR+L8DD ef/Wg3t6FUbjRwf5hfl6q+Y7LwPQA77CWh+98lXTRtePkXMNotV18ZfJPhwEfDQcWD6v jCwUpoGMBRi4csn9FPMkFg7salYEJDD2x2ygXW78k/wOsx8/tW/YT5BhiJp6UmzR1sr/ Paxo9wAkdL+WzHoxbzQd2CvnzHHT9DnoaWvnGlEBou3r3yQwA/u787Fd1AF0v3MUkuOh UYLtxoU3WNBJSXXx6/R3nVey0RyHPlXpmmBhqM8D6zssh4/0vNXgQ/dw3+CVhobPvefd UQqQ== MIME-Version: 1.0 X-Received: by 10.224.12.80 with SMTP id w16mr9808508qaw.83.1413298432604; Tue, 14 Oct 2014 07:53:52 -0700 (PDT) Sender: are.you.winning@gmail.com Received: by 10.141.28.193 with HTTP; Tue, 14 Oct 2014 07:53:52 -0700 (PDT) In-Reply-To: References: <776669CE-9E8C-4069-9834-C7275CCA0EF4@ajf.me> <4240E494-94E6-4FC9-BB84-C30FFA69129C@benramsey.com> <69EB8F97-7CFC-44E0-8B2D-C2230ADAC87F@ajf.me> Date: Tue, 14 Oct 2014 15:53:52 +0100 X-Google-Sender-Auth: oiPfss0s9-lwbVi0IKgmciX1d4o Message-ID: To: Mike Dugan Cc: Ben Ramsey , Andrea Faulds , Kris Craig , Andrey Andreev , Chris Wright , PHP internals list Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] New globals for PUT and DELETE From: cw@daverandom.com (Chris Wright) On 14 October 2014 15:25, Mike Dugan wrote: > On October 14, 2014 at 10:21:34 AM, Ben Ramsey (ben@benramsey.com) wrote: > > > On Oct 14, 2014, at 9:08 AM, Mike Dugan wrote: > >> On October 14, 2014 at 10:04:00 AM, Andrea Faulds (ajf@ajf.me) wrote: >>> >>> >>> So $_QUERY and $_FORM, then. That sounds about right. >>> >> >> Did I just name a global variable? W00t! >> >> Anyhow, yeah neither one is technically 100% correct, but like Andrea >> said, the majority of usage will be from forms and query strings with >> parameters. At any rate, it=E2=80=99s makes more sense semantically in t= he context >> of what the var actually contains than $_GET and $_POST ever will. >> > > +1 > > I=E2=80=99m cool with $_QUERY and $_FORM. They make much more sense and d= on=E2=80=99t try to > use HTTP verbs, which can confuse the content and semantics of the data t= hey > contain. Plus, they would just alias $_GET and $_POST, respectively, righ= t? > > -Ben > > > > > > That=E2=80=99s my understanding. There=E2=80=99s also some discussion abo= ut deriving data > from $_POST/$_FORM that is intended for use with other HTTP verbs, I=E2= =80=99m still > trying to ascertain exactly what was in mind there (Andrea I think you > suggested that?) Well the top of the discussion was suggesting $_PUT and $_DELETE, which would imply that entity bodies are processed for all HTTP verbs, the more semantic names for the existing variables came out of this suggestion (as putting data from other request methods into $_POST isn't very intuitive). I'm about +0.5 on both. The name aliases are more semantically correct, and that's a good thing, but also not entirely necessary. Processing entity bodies regardless of request method (baring in mind that this is still content type dependent) is certainly harmless and may be useful to someone somewhere. I still think this deflects focus from what would be more useful here: a native request abstraction *object*, which provides access to all elements of the *request* without a) splitting them up into distinct global data stores as the current $_GET, $_POST, $_COOKIE does and b) mixing request data in with server environment data, as $_SERVER currently does.