Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78030 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27492 invoked from network); 14 Oct 2014 16:18:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Oct 2014 16:18:48 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 209.85.216.49 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.216.49 mail-qa0-f49.google.com Received: from [209.85.216.49] ([209.85.216.49:53218] helo=mail-qa0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7F/39-18603-7EC4D345 for ; Tue, 14 Oct 2014 12:18:47 -0400 Received: by mail-qa0-f49.google.com with SMTP id f12so6045477qad.22 for ; Tue, 14 Oct 2014 09:18:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=MX/eUnkt2rGVq4iNKo/7C0XVhDhfKutVDbGy/SLlDVY=; b=ckTjtUVj5kpizlgX1DzAC8xrSXZXiiPFob2nKjtqgsP9Cfdf5Fn8oIcrwHOJBG7GF5 AoN+uS8QNjRT8igi4dq/JDlhXI2e0JNcAQgG+SgsNSR+SWfuip4Gp7BJlNqKznXk6241 Z7g5f7WXCNspdWGi3IQ1AFv0ZrfjWw0UA6gqfnJDtb6e7QpZz64nE0gRI8JjBRj5GdrQ 3apCSUrTLdj5kj8d00RFux71/4cUnEOhMVNIEC+Seiaol3SMKG0ii79tpgnjO0j6CEsC yh+N1fObyN/OwKvPJ9MoXG8+MCUx0B7jOi7PP0K4LlZb+3BF5Ou7RzQcBUDCamd+Aptw mmcA== X-Gm-Message-State: ALoCoQl3NPcArQ/GRkX6nlWPlr7+foVXyYCVxbV2YVAUOReGFOngeMhBl4/BTHhwCrKix1tAPX5U X-Received: by 10.140.28.133 with SMTP id 5mr9283383qgz.63.1413303524424; Tue, 14 Oct 2014 09:18:44 -0700 (PDT) Received: from [192.168.200.14] (c-50-131-44-225.hsd1.ca.comcast.net. [50.131.44.225]) by mx.google.com with ESMTPSA id q90sm15780679qgd.4.2014.10.14.09.18.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Oct 2014 09:18:43 -0700 (PDT) Message-ID: <543D4CE1.5000109@lerdorf.com> Date: Tue, 14 Oct 2014 09:18:41 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Mike Dugan , Andrea Faulds , Kristopher CC: PHP internals list , Andrey Andreev , Kris Craig References: <776669CE-9E8C-4069-9834-C7275CCA0EF4@ajf.me> <8CB055D4-F164-4DF3-B019-684BAE7E016E@ajf.me> <543D47C1.9050009@lerdorf.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] New globals for PUT and DELETE From: rasmus@lerdorf.com (Rasmus Lerdorf) On 10/14/2014 09:15 AM, Mike Dugan wrote: > On October 14, 2014 at 11:57:26 AM, Rasmus Lerdorf (rasmus@lerdorf.com > ) wrote: >> On 10/14/2014 06:29 AM, Andrea Faulds wrote: >> > >> > On 14 Oct 2014, at 14:27, Kristopher wrote: >> > >> >> $_HTTP_REQUEST_BODY and $_HTTP_QUERY_STRING for nostalgia's sake. >> > >> > Ew, non-superglobals. >> > >> > But $_REQUEST_BODY and $_QUERY_STRING are a bit lengthy. Perhaps $_QUERY (for $_GET) and $_BODY (for $_POST)? Then the variable set finally makes sense, but isn’t too long: >> > >> > * $_QUERY - query string parameters >> > * $_BODY - request body parameters >> > * $_REQUEST - query string and request body parameters >> > >> > Makes more sense than $_GET and $_POST. >> > >> > Any objections? >> >> It makes no sense to me to make $_BODY an alias for $_POST. $_POST >> implies the default body encoding that a broswer performs on a POST >> request. Making an alias called $_BODY that doesn't contain the body of >> a request unless it is "POST"-encoded would be super confusing. >> >> I think the pedantry level around this is rather high. Nobody is >> actually confused about $_GET and $_POST and how and when to use them. >> Adding vague aliases adds confusion to something that had no confusion >> before. >> >> -Rasmus >> >> > For clarity, $_BODY was revised to $_FORM. > > I think there was some misunderstanding of the usage of $_GET earlier in > this thread, although I may have misunderstood someone’s wording. > Regardless, if I go out and sample 100 PHP folks, I’m fairly confident > someone would make the association that either $_GET or $_POST is bound > strictly to the HTTP verb of the same name. Adding aliases gives these > vars a more semantic name while not causing a massive BC breakage. I think 20+ years of history has proven this to be a non-issue. Of all the things that people get confused by in PHP, $_GET/$_POST are right near the bottom of the list. -Rasmus