Re: Deprecating "global" + $GLOBALS, making $_REQUEST, $_GET, $_POST read-only
| From: | Andrey Hristov | Date: | Thu, 09 Dec 2010 10:38:14 +0000 |
| Subject: | Re: Deprecating "global" + $GLOBALS, making $_REQUEST, $_GET, $_POST read-only | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-50927@lists.php.net to get a copy of this message | ||
James Butler wrote:
-----Original Message----- From: Andrey Hristov [mailto:php@hristov.com]Yes, as the documentation will mention how to do it, for old applications. For new apps it is easy - pass all the information you need as parameter to the function. It works in other languages, why shouldn't it work for PHP?James Butler wrote:+1 million because GLOBAL scope is horrid (generally) and is thoroughly abused -1 million because it will be the most horrific BC break since time began and I imagine it will break so much code that is currently in the wild...how hard it will be to grep for "global" and $GLOBALS?Not hard for you or I but what about the beginners out there, will they know how to find them or work around the use of globals?
mild migration pathIn short I like it but I'm not sure how it would ever get implemented without breaking stuff... (this is where the clever core developers can propose some easy method I can't think of right now)INI variable, like register_globalsSorry, I wasn't being very clear there, what I really meant to say was will there be the will to remove it considering the effects. I suppose INI is enough to allow it to be easily changed, but would it ever become a default setting of off, rather than something that can be optionally off?