On Tue, 2004-02-17 at 04:55, Stig S. Bakken wrote: > Hi Dave, > > I think I see what you're saying. Static class variables are associated > with the class, if the class persists between requests, so should its > static variables.
[snip] > All of these basically keep the parsed representation of code in shared > memory between requests. It doesn't give you persistent class statics, > but at least the request startup is much lower. Great response, you saved me a lot of typing. :) To add one thing, I have code that I use to easily persist an object across a session, additionally it can save the class's static properties (hacked into PHP4[1]). With this and my implementation of the singleton pattern I am able to persist a singleton throughout a session. It's not exactly what you are talking about but can be just as useful. Additionally you can use a database or shared memory to implement global variables and save objects/static variables/whatever into them. Of course, once you have variables available to multiple instances of PHP you will have to deal with locking issues. Regards, Adam [1] http://adam.bregenzer.net/php/static_class_properties -- Adam Bregenzer [EMAIL PROTECTED] http://adam.bregenzer.net/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php