$obj = array(); //序列化 $s = base64_encode(serialize($obj)); //反序列化 $original = unserialize(base64_decode($s));