Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50935 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83011 invoked from network); 9 Dec 2010 11:03:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Dec 2010 11:03:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=addw@phcomp.co.uk; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=addw@phcomp.co.uk; sender-id=permerror Received-SPF: pass (pb1.pair.com: domain phcomp.co.uk designates 78.32.209.33 as permitted sender) X-PHP-List-Original-Sender: addw@phcomp.co.uk X-Host-Fingerprint: 78.32.209.33 freshmint.phcomp.co.uk Linux 2.6 Received: from [78.32.209.33] ([78.32.209.33:62939] helo=mint.phcomp.co.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 86/74-61607-E87B00D4 for ; Thu, 09 Dec 2010 06:03:45 -0500 Received: from addw by mint.phcomp.co.uk with local (Exim 4.63) (envelope-from ) id 1PQeHi-0006bW-PW; Thu, 09 Dec 2010 11:03:38 +0000 Date: Thu, 9 Dec 2010 11:03:38 +0000 To: Andrey Hristov Cc: Eloy Bote Falcon , PHP Internals List Message-ID: <20101209110338.GE22675@phcomp.co.uk> Mail-Followup-To: Andrey Hristov , Eloy Bote Falcon , PHP Internals List References: <4D00ABFE.5070403@hristov.com> <4D00AD47.8030200@thelounge.net> <4D00AE18.9050300@hristov.com> <4D00B514.7090803@hristov.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D00B514.7090803@hristov.com> User-Agent: Mutt/1.4.2.2i Organization: Parliament Hill Computers Ltd Subject: Re: [PHP-DEV] Deprecating "global" + $GLOBALS, making $_REQUEST, $_GET, $_POST read-only From: addw@phcomp.co.uk (Alain Williams) On Thu, Dec 09, 2010 at 11:53:08AM +0100, Andrey Hristov wrote: > >Is copying the POST variables into another variables best practice (like a > >manual register_globals)? In the global scope of the application I think > >it's cleaner to work with $_POST to overwrite the values than copying the > >items into variables. Inside a function/method, I agree that it's best > >practice to pass $_POST as a parameter and then overwrite the values as you > >need. > > $_POST is POST, incoming variables, everything else is a hack. If you > expect that the variable might change then copy it, at least someone > this will signal that the value might have been changed somewhere. What is the real difference between operating on $_POST directly and some other copy of it ? Not everyone writes huge, complicated scripts written by many different people. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php #include