Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78029 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25719 invoked from network); 14 Oct 2014 16:15:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Oct 2014 16:15:17 -0000 Authentication-Results: pb1.pair.com header.from=mike@mjdugan.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=mike@mjdugan.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mjdugan.com from 209.85.192.49 cause and error) X-PHP-List-Original-Sender: mike@mjdugan.com X-Host-Fingerprint: 209.85.192.49 mail-qg0-f49.google.com Received: from [209.85.192.49] ([209.85.192.49:61302] helo=mail-qg0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0C/D8-18603-41C4D345 for ; Tue, 14 Oct 2014 12:15:16 -0400 Received: by mail-qg0-f49.google.com with SMTP id e89so2906708qgf.8 for ; Tue, 14 Oct 2014 09:15:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:message-id:in-reply-to :references:subject:mime-version:content-type; bh=NSqFfXS3PqvPkCIlF3TpTwRUrs2CBT3QZh9N5W7JhaQ=; b=Ho7QhISyRXYNL4YNw3dtHx4d2yJbFGsPHOUa7FF0nwJCi6yyW0QZIRGWwm/2Y2o7nr l8EFlC1e8l/X9SdoEIg9U/wl6mdD5HUhYId0ndgRb0NrYWEI0m9JDQWV9O2D200hL2Pa bEz+A4qC/4LukJLUTXP3iSC/BgRrUDSBt7KgraBFCJfKEt/Lj0DoMJjLtwjdWsrOgmxn RNQ57ip5LqvBg3ie0vvV6ERXQPlZoodTeLck4m/YKZHREuvZ9l6DWydc6JQCswK2wULm GwyyHtbYJC9FhE80fegEa+G562SXZ9mD6mCCu1HMkeTKzF9fc1RtjMqKd9lKFNvniAdf 2bFA== X-Gm-Message-State: ALoCoQmOsnAoReD7nZCAAgw5CLo8+53/78GOx4KD72wkALpM6TP8iXMCTRBEWjq6T7Y1GckkJ0eM X-Received: by 10.140.85.233 with SMTP id n96mr10401556qgd.78.1413303313899; Tue, 14 Oct 2014 09:15:13 -0700 (PDT) Received: from Mikes-iMac.local (c-71-200-126-32.hsd1.md.comcast.net. [71.200.126.32]) by mx.google.com with ESMTPSA id m8sm15804841qag.25.2014.10.14.09.15.13 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Tue, 14 Oct 2014 09:15:13 -0700 (PDT) Date: Tue, 14 Oct 2014 12:15:10 -0400 To: Andrea Faulds , Rasmus Lerdorf , Kristopher Cc: PHP internals list , Andrey Andreev , Kris Craig Message-ID: In-Reply-To: <543D47C1.9050009@lerdorf.com> References: <776669CE-9E8C-4069-9834-C7275CCA0EF4@ajf.me> <8CB055D4-F164-4DF3-B019-684BAE7E016E@ajf.me> <543D47C1.9050009@lerdorf.com> X-Mailer: Airmail (249) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="543d4c0e_1f16e9e8_12d" Subject: Re: [PHP-DEV] New globals for PUT and DELETE From: mike@mjdugan.com (Mike Dugan) --543d4c0e_1f16e9e8_12d Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On October 14, 2014 at 11:57:26 AM, Rasmus Lerdorf (rasmus=40lerdorf.com)= wrote: On 10/14/2014 06:29 AM, Andrea =46aulds wrote: =20 > =20 > On 14 Oct 2014, at 14:27, Kristopher wro= te: =20 > =20 >> =24=5FHTTP=5FREQUEST=5FBODY and =24=5FHTTP=5FQUERY=5FSTRING for nostal= gia's sake. =20 > =20 > Ew, non-superglobals. =20 > =20 > But =24=5FREQUEST=5FBODY and =24=5FQUERY=5FSTRING are a bit lengthy. Pe= rhaps =24=5FQUERY (for =24=5FGET) and =24=5FBODY (for =24=5FPOST)=3F Then= the variable set finally makes sense, but isn=E2=80=99t too long: =20 > =20 > * =24=5FQUERY - query string parameters =20 > * =24=5FBODY - request body parameters =20 > * =24=5FREQUEST - query string and request body parameters =20 > =20 > Makes more sense than =24=5FGET and =24=5FPOST. =20 > =20 > Any objections=3F =20 It makes no sense to me to make =24=5FBODY an alias for =24=5FPOST. =24=5F= POST =20 implies the default body encoding that a broswer performs on a POST =20 request. Making an alias called =24=5FBODY that doesn't contain the body = of =20 a request unless it is =22POST=22-encoded would be super confusing. =20 I think the pedantry level around this is rather high. Nobody is =20 actually confused about =24=5FGET and =24=5FPOST and how and when to use = them. =20 Adding vague aliases adds confusion to something that had no confusion =20 before. =20 -Rasmus =20 =46or clarity, =24=5FBODY was revised to =24=5F=46ORM. I think there was some misunderstanding of the usage of =24=5FGET earlier= in this thread, although I may have misunderstood someone=E2=80=99s word= ing. Regardless, if I go out and sample 100 PHP folks, I=E2=80=99m fairly= confident someone would make the association that either =24=5FGET or =24= =5FPOST is bound strictly to the HTTP verb of the same name. Adding alias= es gives these vars a more semantic name while not causing a massive BC b= reakage.=C2=A0 The documentation would be simple and not have room for misinterpretation= as I see it: =24=5F=46ORM is the exact same by-reference variable as =24=5FPOST =24=5FQUERY is the exact same by-reference variable as =24=5FGET=C2=A0 --=C2=A0 Mike Dugan mike=40mjdugan.com --543d4c0e_1f16e9e8_12d--