Re: user-defined superglobals?

From: Date: Sat, 23 Aug 2003 23:50:11 +0000
Subject: Re: user-defined superglobals?
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-160551@lists.php.net to get a copy of this message
Someone wrote a php module that did this around 6 to 9 months ago. It was easy to install but you needed access to php.ini. Try using extract with the option to use references so you don't create a copy of the variable just a pointer to it. Jason Matthias Nothhaft wrote:
Sorry this all is not what I'm looking for. I see it is not possible at the moment. It would be nice to have a php-function like declare_superglobal($_MYFRAMEWORK); And then use $_MYFRAMEWORK like $_GET. Thanks nevertheless. Regards, Matthias Ray Hunter wrote:
Well, this is clear, (I'm only new in the list - not in PHP ;-) ) but I want it in a better/shorter way for the "master var" of a big project!
Yes you can set up a master file that includes all your master vars...many php developers call this a configuration script and name it config.php. This allows users to set up global variables that are used through out the application.
Is there a way to request such a feature and where? I think this would be nice for application frameworks!? Maybe also for PEAR...
There are implementations of this all thru PEAR. -- BigDog


« previous php.general (#160551) next »