Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58050 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79019 invoked from network); 24 Feb 2012 23:15:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Feb 2012 23:15:10 -0000 Authentication-Results: pb1.pair.com smtp.mail=larry@garfieldtech.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=larry@garfieldtech.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain garfieldtech.com from 66.111.4.29 cause and error) X-PHP-List-Original-Sender: larry@garfieldtech.com X-Host-Fingerprint: 66.111.4.29 out5-smtp.messagingengine.com Received: from [66.111.4.29] ([66.111.4.29:53990] helo=out5-smtp.messagingengine.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0D/93-17132-EF9184F4 for ; Fri, 24 Feb 2012 18:15:10 -0500 Received: from compute6.internal (compute6.nyi.mail.srv.osa [10.202.2.46]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id A9FF520AA5 for ; Fri, 24 Feb 2012 18:15:07 -0500 (EST) Received: from frontend1.nyi.mail.srv.osa ([10.202.2.160]) by compute6.internal (MEProxy); Fri, 24 Feb 2012 18:15:07 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=hbhlc0BLb89bG2Jc3jFqtn mnuKI=; b=OXkT/OiL0PKFZsD1hVM0td+bFBT1CKzPCQMy3pyAFmZtPV4kbHNt33 wYNR5K5K7hyIesyiHx4QKymWZTgUbtfW64ingpDxPO0Est0R27nx3NxVj2vCzvtE iA+DeSQvba/YuvdpGgfSjJ++HizK9yHrpYL6ZWXVQQjWSCsC/PDrE= X-Sasl-enc: PE4/7QjRuLOMeV1f52DenGRw8Tc7+3ln/yaiF8crHet0 1330125307 Received: from garfield.ad.palantir.net (unknown [209.41.114.202]) by mail.messagingengine.com (Postfix) with ESMTPSA id 5BF328E009B for ; Fri, 24 Feb 2012 18:15:07 -0500 (EST) Message-ID: <4F4819FB.9000607@garfieldtech.com> Date: Fri, 24 Feb 2012 17:15:07 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: internals@lists.php.net References: <8D8E9A0839FE464FBBDF2B499DAFA596@gmail.com> <88ad33db205558862288b3114ef4c391.squirrel@www.l-i-e.com> <4F480C5B.30606@garfieldtech.com> <96462fbc4e243e75b11b455624ac4140.squirrel@www.l-i-e.com> <4F4811E6.4050201@garfieldtech.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] $_PARAMETERS Super Global Object From: larry@garfieldtech.com (Larry Garfield) On 2/24/12 4:55 PM, Jeremiah Dodds wrote: >> Except that per HTTP, GET and POST are completely different operations. One >> is idempotent and cacheable, the other is not idempotent and not cacheable. >> I very much care which someone is using. > > Correct me if I'm wrong, but you're referring to the HTTP *method* > used. A POST can be made to a URL that includes a query-string, but > what that means as far as interpreting the variables is undefined as > far as I know. > > Because of that, I think it's a bad idea to either treat them as the > same thing, or rely on both $_POST and $_GET parameters being present. The underlying problem is that HTTP has a URI query string, and a body. In a typical GET request there is no body. In a typical POST the body is a query string in similar format to the URI's query string, plus possibly other stuff. In other request methods the body may be something else entirely. PHP's superglobals make the (wrong) assumption that the URI query string comes from a GET query (hence $_GET) and body comes from a POST query string ($_POST), because that matches up with the default method="" attribute of HTML forms. That assumption is limiting and misleading, and made worse by the existence of $_REQUEST, but is the assumption that PHP makes. --Larry Garfield