Yes thats fine, there is a DB and auth and template class i instance globally, these are across pages aswell should i do the same ?? I dont wont to go overboard and slow the system down, I'd really want to make it scalable. These dont store any data as such though like the rest. The others i instance when i need them.

Thanks !

If you don't store data in a class, then there is absolutely no reason to serialize it in a session. Serialization will *only* store property values, not methods (objects become glorified arrays). But maybe in the future this will change? A boy can dream :)


Come to think of it, in PHP5 you probably *could* serialize methods in the object. But to do it you'd need to store Reflection_Method objects as properties, which just introduces a lot of other messy problems.

So, um, long answer to your question: don't bother serializing those other global objects, since they don't store data.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to