I've been doing some reading and I've seen a lot of people stating that you must serialize an object before storing it in a session.
Code PHP:$user->setName("Kyle"); $_SESSION['userData'] = serialize($user);
I've found it difficult to find supporting documentation though. Why do we need to serialize before storing the object in a session?
Additionally:
Should these perhaps be avoided due to possible performance issues?




Reply With Quote

). But anyway, for several reasons the user object must be always fresh in my case. A single SELECT by ID query runs in about 0.0006 seconds on one of my shared hosts so this is far from being noticeable
.

Bookmarks