Re: Re: Question about superglobals

From: Date: Sat, 17 Nov 2007 00:28:19 +0000
Subject: Re: Re: Question about superglobals
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-33184@lists.php.net to get a copy of this message
I think the superglobal keyword is a great idea. I have a custom class that implements a custom interface to memcache with a MySQL backend for data that drops out of memcache or is to big to be stored easily in memcache. I get annoyed at needing to include a global statement in every place I want to use memcache.
I don't think it's a good idea. Superglobals are special for a reason - if everybody would just add stuff into global space and make it superglobal because they can't type a couple of keystrokes, it would be a mess. Just declare a class and use statics or singletons. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

« previous php.internals (#33184) next »