Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57972 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13655 invoked from network); 23 Feb 2012 05:59:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Feb 2012 05:59:55 -0000 Authentication-Results: pb1.pair.com header.from=wgpdeepak1989@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=wgpdeepak1989@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.42 as permitted sender) X-PHP-List-Original-Sender: wgpdeepak1989@gmail.com X-Host-Fingerprint: 209.85.160.42 mail-pw0-f42.google.com Received: from [209.85.160.42] ([209.85.160.42:65403] helo=mail-pw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5E/81-07254-AD5D54F4 for ; Thu, 23 Feb 2012 00:59:55 -0500 Received: by pbcwz12 with SMTP id wz12so1143071pbc.29 for ; Wed, 22 Feb 2012 21:59:52 -0800 (PST) Received-SPF: pass (google.com: domain of wgpdeepak1989@gmail.com designates 10.68.218.161 as permitted sender) client-ip=10.68.218.161; Authentication-Results: mr.google.com; spf=pass (google.com: domain of wgpdeepak1989@gmail.com designates 10.68.218.161 as permitted sender) smtp.mail=wgpdeepak1989@gmail.com; dkim=pass header.i=wgpdeepak1989@gmail.com Received: from mr.google.com ([10.68.218.161]) by 10.68.218.161 with SMTP id ph1mr1774072pbc.107.1329976792335 (num_hops = 1); Wed, 22 Feb 2012 21:59:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=sOVkbvPEupYnn5aqBBY/v40KBaojCPZRNmJyQUr9eRY=; b=i1Our5CCbCxdwl4vlmYLB8vAG2TS6fqR1XOGw1nVQlAbm0BzzRLt54m9z72qFSPvPv IM7v/HYgIapOYgTQSesPSaKLChzR6laXlMKHkVOgSYe32Fujoc5hqObqiF6Ug1VgMMwJ wdnU5hUuEDNZ/fWRQXNS0vB0DY09DBwOtDgyI= MIME-Version: 1.0 Received: by 10.68.218.161 with SMTP id ph1mr1560318pbc.107.1329976792236; Wed, 22 Feb 2012 21:59:52 -0800 (PST) Received: by 10.68.240.101 with HTTP; Wed, 22 Feb 2012 21:59:52 -0800 (PST) In-Reply-To: <4F45618F.4000204@gmail.com> References: <4F45618F.4000204@gmail.com> Date: Thu, 23 Feb 2012 11:29:52 +0530 Message-ID: To: =?ISO-8859-1?Q?=C1ngel_Gonz=E1lez?= Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary=e89a8ff2488342c29f04b99b5aaa Subject: Re: [PHP-DEV] $_PARAMETERS Super Global Object From: wgpdeepak1989@gmail.com (Deepak Balani) --e89a8ff2488342c29f04b99b5aaa Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Yes, I'm agree with Will Fitch. Handling this problem with PHP is a good idea and beneficial to programmer. 2012/2/23 =C1ngel Gonz=E1lez > On 22/02/12 15:57, Michael Morris wrote: > > Before writing up a full RFC I want to put out a feeler on something. > > Currently we have several input parameter objects, chief among them > > $_GET, $_POST, $_REQUEST, $_SERVER (for the client HTTP headers). All > > of them are arrays and legacy code sometimes writes to them. Locking > > them as read only objects would cause a major BC break. > > Why would you want to set them read-only? > I agree that they should represent the input parameters, but there are > times > where modificating them is very useful. > For instance, a framework code could be modifying $_GET on index.php to > strip magic quotes before passing it down to another module. > Even better, that code would work even for modules written before > supporting > that configuration. > If the module had used directly such $_PARAMETERS, it would get wrong > results. > > I guess we will start seeing the opposite behavior with 5.4, though: > Code doing > addslashes() on input parameters before running code which expected magic > quotes (maybe at auto_prepend_file, even). But still, it's good to have > such > ability even if it's something to be avoided. > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --e89a8ff2488342c29f04b99b5aaa--