Re: Creating custom superglobals

From: Date: Mon, 14 Aug 2006 23:59:53 +0000
Subject: Re: Creating custom superglobals
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-240666@lists.php.net to get a copy of this message
On Mon, August 14, 2006 8:40 am, Ville Mattila wrote: > Does the PHP environment (5.1.4) provide a way to define some custom > variables as a superglobal? It would be useful for saving certain site > preferences and settings that must be referred in many variables and > classes, without every time writing global keyword at the beginning of > a > function definition. Not unless you want to install the RunKit extension, which pretty much lets you re-define ANYTHING in PHP... Probably a Bad Idea... $_SESSION might be a reasonable place to store your data, however, depending on what it is... Maybe I'm mis-understanding what you are storing, but it seems like the kind of stuff that belongs in $_SESSION... -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#240666) next »