Singleton

From: Date: Tue, 23 Oct 2001 15:55:02 +0000
Subject: Singleton
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-71954@lists.php.net to get a copy of this message
I'd like to to make a Singleton object in PHP4. I'm trying to use a static variable in a function to do that. Every time I use the reload in the Browser client, the file doesn't seem to keep the information (I kind of expected that). I could think only 2 ways to do that. 1. Using shared memory -> which I don't think is really an option for it would make the code to difficult to manage later on. 2. Using environment variables -> which would not be good to store any kind of data, such as a pointer to an open file. Any suggestions anyone ? Thanks, Victor

« previous php.general (#71954) next »