The-Last-Escape Posted May 3, 2007 Share Posted May 3, 2007 Is it possible, or worthwhile, to place objects in sessions or does it make more sense to just pass an array around and make an object when you need to? I tried to pass an object as a session variable, but that ended up needing the __autoload () function and even then it seemed to have lost all its data... Anyone have any suggestions? Link to comment https://forums.phpfreaks.com/topic/49821-objects-and-sessions/ Share on other sites More sharing options...
trq Posted May 3, 2007 Share Posted May 3, 2007 Yes its possible to pass objects around in sessions. Is it worthwhile? Depends what the object does. If its perisistency your after, I usually find it better to serialize and store the object in a database, then retrieve it again when I need it. Link to comment https://forums.phpfreaks.com/topic/49821-objects-and-sessions/#findComment-244373 Share on other sites More sharing options...
The-Last-Escape Posted May 3, 2007 Author Share Posted May 3, 2007 Thanks for the info Link to comment https://forums.phpfreaks.com/topic/49821-objects-and-sessions/#findComment-244376 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.