theres nothing wrong with serialize, if you look again at the manual you will see
"Never use gettype() to test for a certain type"
instead use is_object or is_array etc , that said until we know exactly what kind of data you are serializing its hard to know...
if you mean a true class object then that class needs to be accessible wherever you try and use it i.e. the below example is useless unless the include('s_cart.class.php'); line is there
so above if the session exists we reproduce our saved object , else we start a new one, again unless we include the s_cart class it wont work.
$scart = new s_cart();
(the session data is saved by a method of c_cart like so