be wary of doing this where performance is an issue - dataobjects used something like this to store options early on. - - PEAR::getStaticProperty() ** note this could be used for singletons as well.
however after alot of profiling I realized that it was slowing down the whole application.
if you have to get the singleton of a class often it's better to stick with $GLOBALS etc.
you mean 'static' is slow? how can that be?
It's the function call overhead that is slow - static is not that bad afaik.
Regards
Alan
--
Can you help out?
Need Consulting Services or Know of a Job?
http://www.akbkhome.com