Re: Re: Question about superglobals
| From: | Michael McGlothlin | Date: | Sat, 17 Nov 2007 03:26:07 +0000 |
| Subject: | Re: Re: Question about superglobals | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-33193@lists.php.net to get a copy of this message | ||
So the idea now is to inappropriately force everything to be a class?
-- Michael McGlothlin Southwest Plumbing SupplyYes, and in even larger scale applications it can become even more useful. I have a web framework I'm working on, it's about 9,500 lines of code now with hundreds of functions/classes. Every function/method has to specify global for my 3 universal variables which contain large arrays of configuration information. With this, I can say "superglobal $mod, $sec, $cfg" in my root include file, and not worry about it again.class Config {const FOO = "Bar";} function oink() {if (Config::FOO == 'Bar') { echo "OINK"; }} etc. IMO, you really don't need more superglobals. S