I agree, I wouldn't want to create a class just for one variable to be in it. It works, yes, but it's just not the clean way to do things. Why not allow maximum flexibility?
On Fri, 2007-11-16 at 20:26 -0700, Michael McGlothlin wrote: > So the idea now is to inappropriately force everything to be a class? > >> Yes, 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 > > > -- > Michael McGlothlin > Southwest Plumbing Supply > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php