sessions variables are implicitly serialised when a session is closed, and deserialised when opened.
if you assign an object to a session variable, you need to make the object known to php before starting the session.
if this is impossible (because you use session auto start or similar) it can be useful manually to serialise an object before assigning it to a session variable. then you can manually deserialise it once you have instantiated a new object reference in your code.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.