Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50975 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8808 invoked from network); 9 Dec 2010 19:57:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Dec 2010 19:57:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 207.97.245.193 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 207.97.245.193 smtp193.iad.emailsrvr.com Linux 2.6 Received: from [207.97.245.193] ([207.97.245.193:59466] helo=smtp193.iad.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E9/20-07280-194310D4 for ; Thu, 09 Dec 2010 14:57:12 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp39.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 1E4AD98AAC; Thu, 9 Dec 2010 14:57:00 -0500 (EST) X-Virus-Scanned: OK Received: by smtp39.relay.iad1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 05C461D010C; Thu, 9 Dec 2010 14:55:52 -0500 (EST) Message-ID: <4D013448.9060601@sugarcrm.com> Date: Thu, 09 Dec 2010 11:55:52 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: Andrey Hristov CC: PHP Internals List References: <4D00ABFE.5070403@hristov.com> In-Reply-To: <4D00ABFE.5070403@hristov.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Deprecating "global" + $GLOBALS, making $_REQUEST, $_GET, $_POST read-only From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > the topic says most of it. What do you think about deprecating the > global keyword and $GLOBALS with it? Together with this making No, I think it's a bad idea. I know over-using globals is bad, but they still have their uses and huge amount of apps is using them one way or another. > $_REQUEST, $_GET and $_POST read-only as they should be used only to > read-only anyway. This would probably be bad for tests on many applications, and quite big BC break. > 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. I don't believe you can B&D users into a good code. Java has tons of awful code. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227