Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50924 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65826 invoked from network); 9 Dec 2010 10:23:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Dec 2010 10:23:26 -0000 Authentication-Results: pb1.pair.com header.from=php@hristov.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php@hristov.com; spf=permerror; 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:55496] helo=iko.gotobg.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0E/E0-61607-D1EA00D4 for ; Thu, 09 Dec 2010 05:23:26 -0500 Received: from [77.0.224.33] (helo=[192.168.1.100]) by iko.gotobg.net with esmtpa (Exim 4.69) (envelope-from ) id 1PQdee-0007KN-Pc for internals@lists.php.net; Thu, 09 Dec 2010 12:23:17 +0200 Message-ID: <4D00AE18.9050300@hristov.com> Date: Thu, 09 Dec 2010 11:23:20 +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> In-Reply-To: <4D00AD47.8030200@thelounge.net> 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) Reindl Harald wrote: > Please do not > > global + GLOBALS can be used in so many ways and you would break > 200.000 LOC only here which is running with reporting E_STRICT > in a production environment what happened after register_globals was introduced and registering of globals was switched off? > The same for making $_GET/$_POST/$_REQUEST readonly > I know that it is not best practice, but sometimes > it makes life easier to fetch $_POST in a method > which overwrites a parent method and add a single > item before the parent is processing $_POST It's bad practice. > Yes, there are many other ways to do the same but > BC-breaking trigger a lot of work and testing > > Am 09.12.2010 11:14, schrieb Andrey Hristov: >> Hi guys, >> the topic says most of it. What do you think about deprecating the global keyword and $GLOBALS with it? Together >> with this making $_REQUEST, $_GET and $_POST read-only as they should be used only to read-only anyway. >> >> The reason for global + GLOBALS is that these are abused and which leads to spaghetti programs, when used by >> unexperienced users. Also they have impact on side effects from functions that don't only rely their parameters. >> >> Best, >> Andrey > > Best, Andrey