Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50937 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86435 invoked from network); 9 Dec 2010 11:15:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Dec 2010 11:15:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.45 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.214.45 mail-bw0-f45.google.com Received: from [209.85.214.45] ([209.85.214.45:33961] helo=mail-bw0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B7/25-61607-C4AB00D4 for ; Thu, 09 Dec 2010 06:15:24 -0500 Received: by bwz16 with SMTP id 16so2615750bwz.32 for ; Thu, 09 Dec 2010 03:15:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=KpaI9cGBx9yQe7QufDkfIX1ybW8U9mynLlLwkinhVnk=; b=ACO21rmfQNlywiFnk8LmwUkbzXXqX+4VXtW6c0CPuJ8Qcmubo9tqXAntQATrwrn19u wdFnHJcIVUNdqQlYKPmNuXTF7/40NpiMkw2mN2eICVWh+1msdrSTda+EKnAl8EGTTrUA rqKqHfwnCnaBLiYwDGbX+KRRhGFDhETUOgdHU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=D+NQ6T+fY63rkUpEWL3UCtrKdhPmnLaGgbsEIQnXussVHMAiPcjvL8gvL6xFzZiM4w gmRLPAZCMNr/Rhlww4fy7a7+jH0RBA9/Jk8ypW19uU340pnzhPy8JsCDQdJHemnjo5uZ AIEbZlkpFrSmyd5qSpsj22zxsUwGMSM8u5rhQ= MIME-Version: 1.0 Received: by 10.204.80.195 with SMTP id u3mr3084531bkk.145.1291893320781; Thu, 09 Dec 2010 03:15:20 -0800 (PST) Received: by 10.204.52.129 with HTTP; Thu, 9 Dec 2010 03:15:20 -0800 (PST) In-Reply-To: <4D00ABFE.5070403@hristov.com> References: <4D00ABFE.5070403@hristov.com> Date: Thu, 9 Dec 2010 12:15:20 +0100 Message-ID: To: Andrey Hristov Cc: PHP Internals List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Deprecating "global" + $GLOBALS, making $_REQUEST, $_GET, $_POST read-only From: pierre.php@gmail.com (Pierre Joye) hi, As far as I remember we discussed that already back to the php discussions. It was not accepted because of the little gains in regard to the major BC breaks. However I would prefer, as far as it is technically possible, deprecate their usage (notices/warnings) and promote filter usage instead. The filter API can also be improved to match what we can find in other platform (perl's cgi module for example is quite good) and make the input data processing even more user-friendly. Cheers, On Thu, Dec 9, 2010 at 11:14 AM, Andrey Hristov wrote: > =A0Hi 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 impa= ct > on side effects from functions that don't only rely their parameters. > > Best, > Andrey > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --=20 Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org