Reputation: 97
Is there any reason to serialize an object stored in a $_SESSION variable?
Upvotes: 1
Views: 127
Reputation: 522195
If your session is auto-started, you have to resort to pretty ugly hacks to load the class definitions beforehand so the object can be properly unserialized. In this case, unserializing by hand is preferable. Of course, in this case, not auto-starting the session is even more preferable.
Upvotes: 2