Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50922 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63220 invoked from network); 9 Dec 2010 10:19:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Dec 2010 10:19:57 -0000 Authentication-Results: pb1.pair.com header.from=h.reindl@thelounge.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=h.reindl@thelounge.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain thelounge.net designates 91.118.73.15 as permitted sender) X-PHP-List-Original-Sender: h.reindl@thelounge.net X-Host-Fingerprint: 91.118.73.15 mail.thelounge.net Windows 98 (1) Received: from [91.118.73.15] ([91.118.73.15:40609] helo=mail.thelounge.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 55/50-61607-B4DA00D4 for ; Thu, 09 Dec 2010 05:19:56 -0500 Received: from [10.0.0.99] (rh.thelounge.net [10.0.0.99]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.thelounge.net (Postfix) with ESMTPSA id 4408CD8; Thu, 9 Dec 2010 11:19:52 +0100 (CET) Message-ID: <4D00AD47.8030200@thelounge.net> Date: Thu, 09 Dec 2010 11:19:51 +0100 Organization: the lounge interactive design User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101103 Fedora/1.0-0.33.b2pre.fc13 Lightning/1.0b3pre 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> X-Enigmail-Version: 1.1.2 OpenPGP: id=7F780279; url=http://arrakis.thelounge.net/gpg/h.reindl_thelounge.net.pub.txt Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigE4BC46A10AC61862D197A67F" Subject: Re: [PHP-DEV] Deprecating "global" + $GLOBALS, making $_REQUEST, $_GET, $_POST read-only From: h.reindl@thelounge.net (Reindl Harald) --------------enigE4BC46A10AC61862D197A67F Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 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 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 glob= al keyword and $GLOBALS with it? Together > with this making $_REQUEST, $_GET and $_POST read-only as they should b= e used only to read-only anyway. >=20 > The reason for global + GLOBALS is that these are abused and which lead= s to spaghetti programs, when used by > unexperienced users. Also they have impact on side effects from functio= ns that don't only rely their parameters. >=20 > Best, > Andrey --=20 Mit besten Gr=C3=BC=C3=9Fen, Reindl Harald the lounge interactive design GmbH A-1060 Vienna, Hofm=C3=BChlgasse 17 CTO / software-development / cms-solutions p: +43 (1) 595 3999 33, m: +43 (676) 40 221 40 icq: 154546673, http://www.thelounge.net/ --------------enigE4BC46A10AC61862D197A67F Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iEYEARECAAYFAk0ArUgACgkQhmBjz394AnlEHQCfb0JuXv3DZ5Qejjyj9UNN46jR nWgAn04xUxbFT4JQSfQ+igcAf9IJGaiI =pJej -----END PGP SIGNATURE----- --------------enigE4BC46A10AC61862D197A67F--