Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50936 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84430 invoked from network); 9 Dec 2010 11:06:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Dec 2010 11:06:54 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@hristov.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php@hristov.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain hristov.com from 85.92.87.36 cause and error) X-PHP-List-Original-Sender: php@hristov.com X-Host-Fingerprint: 85.92.87.36 iko.gotobg.net Linux 2.6 Received: from [85.92.87.36] ([85.92.87.36:55447] helo=iko.gotobg.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A8/C4-61607-D48B00D4 for ; Thu, 09 Dec 2010 06:06:53 -0500 Received: from [77.0.224.33] (helo=[192.168.1.100]) by iko.gotobg.net with esmtpa (Exim 4.69) (envelope-from ) id 1PQeKh-0006it-D6 for internals@lists.php.net; Thu, 09 Dec 2010 13:06:43 +0200 Message-ID: <4D00B847.40804@hristov.com> Date: Thu, 09 Dec 2010 12:06:47 +0100 User-Agent: Thunderbird 2.0.0.24 (X11/20100411) MIME-Version: 1.0 To: PHP Internals List References: <4D00ABFE.5070403@hristov.com> <4D00AD47.8030200@thelounge.net> <4D00AE18.9050300@hristov.com> <4D00B514.7090803@hristov.com> <20101209110338.GE22675@phcomp.co.uk> In-Reply-To: <20101209110338.GE22675@phcomp.co.uk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - iko.gotobg.net X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - hristov.com X-Source: X-Source-Args: X-Source-Dir: Subject: Re: [PHP-DEV] Deprecating "global" + $GLOBALS, making $_REQUEST, $_GET, $_POST read-only From: php@hristov.com (Andrey Hristov) Alain Williams wrote: > 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. > conceptual. If it is a copy it means something was changed, right? Andrey