Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78062 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86209 invoked from network); 14 Oct 2014 20:22:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Oct 2014 20:22:05 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 209.85.192.45 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.192.45 mail-qg0-f45.google.com Received: from [209.85.192.45] ([209.85.192.45:60285] helo=mail-qg0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1F/55-18603-CE58D345 for ; Tue, 14 Oct 2014 16:22:04 -0400 Received: by mail-qg0-f45.google.com with SMTP id q107so9003774qgd.18 for ; Tue, 14 Oct 2014 13:22:01 -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 :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=5H4cGau8IOcQFHTsFqzZYdRFlfrx8SZ1oKbXcm3UIrA=; b=mYcL/KWAvzpPocSaYQchPLksJWmKvgMh7osIKfgkwoyII7oEP4Kn1qGQCKBFCuCY+/ iZOJF5yavKNqgsdcDWjGZt0Nies7wvPUgRRiq07uYateYzIcSt2zTVMasX/4UEjzIXgh OFZKzfm0M3yk06HUIj1UoPIxg+Vh9tLTFb4Mj1tXV59YqYZczHQirSLCHQG54C9tLveY AwknNuq6kAucobGvuJBOkH6N20RqKDiKRw8gvyq2B6SujcXuJVdtWC8We9n+NvvqBLkB ZOMLP0giGT+qmC6VF+w5jO1LsPXSs8DV4tI+Bv+giwQV4d01mQYDG9B6ZrEH8gfnQScZ nVxw== X-Gm-Message-State: ALoCoQkYvjZu1QtsM0zG4FP/Lla8IwOVaNyJ8nrggmCFzlzXAer03UatYRDgXs35IfC9Wt/+tHJt X-Received: by 10.229.250.9 with SMTP id mm9mr13043688qcb.31.1413318120993; Tue, 14 Oct 2014 13:22:00 -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 a93sm16292739qga.26.2014.10.14.13.21.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Oct 2014 13:22:00 -0700 (PDT) Message-ID: <543D85E6.2020507@lerdorf.com> Date: Tue, 14 Oct 2014 13:21:58 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Rowan Collins , internals@lists.php.net References: <776669CE-9E8C-4069-9834-C7275CCA0EF4@ajf.me> <8CB055D4-F164-4DF3-B019-684BAE7E016E@ajf.me> <543D47C1.9050009@lerdorf.com> <543D4CE1.5000109@lerdorf.com> <543D6864.10508@gmail.com> In-Reply-To: <543D6864.10508@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] New globals for PUT and DELETE From: rasmus@lerdorf.com (Rasmus Lerdorf) On 10/14/2014 11:16 AM, Rowan Collins wrote: > On 14/10/2014 17:18, Rasmus Lerdorf wrote: >> 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. > > The popularity of REST is what has changed this. Until people started > writing RESTful APIs, only two HTTP request types were in common use. > Nobody was confused about where PUT method data would end up, because > nobody processed any PUT methods. > >> 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. > > The encoding has no relationship with the request type, even in browsers > - the default encoding of a POST form is actually the same encoding used > to produce a URL form a GET form. Sure, but $_GET/$_POST do. They were not named to match HTTP primitives. They were named to match form methods. As in form method="get" and method="post". And here the default encoding the browsers use for these two methods definitely matter. -Rasmus