Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50946 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9560 invoked from network); 9 Dec 2010 12:46:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Dec 2010 12:46:21 -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:49974] helo=iko.gotobg.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 76/32-32433-C9FC00D4 for ; Thu, 09 Dec 2010 07:46:21 -0500 Received: from [77.0.224.33] (helo=[192.168.1.100]) by iko.gotobg.net with esmtpa (Exim 4.69) (envelope-from ) id 1PQfsv-0000fP-Bu; Thu, 09 Dec 2010 14:46:09 +0200 Message-ID: <4D00CF96.3070701@hristov.com> Date: Thu, 09 Dec 2010 13:46:14 +0100 User-Agent: Thunderbird 2.0.0.24 (X11/20100411) MIME-Version: 1.0 To: Adam Harvey CC: PHP Internals List References: <4D00ABFE.5070403@hristov.com> In-Reply-To: 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) Adam Harvey wrote: > On 9 December 2010 18:14, Andrey Hristov wrote: >> 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. > > -1 here. No question that if you were developing a new language with > similar design goals to PHP (but learning from the missteps), you'd > probably make the superglobal analogues read only and skip the idea of > $GLOBALS altogether, but there's just too much code out there that > relies on these "features" working. There were many apps which relied on register_globals but register_globals was introduced. There were many apps which relied on references in PHP4, but the object model changed in 5, references too. There are apps which rely on magic_quotes, but magic quotes are deprecated. When some feature is changed or deprecated there will always be applications that need to change. > Adam > Andrey