cool. you and i were talking about two different things. you are using
__sleep and __wakeup by issuing the serialize and unserialize commands
yourself. i am using __sleep and __wakeup when php automatically issues
them itself when using sessions.
it is my experience that if you have an object an
// return list of instance-variables to be serialized
return array('error', 'svar');
}
function __wakeup() {
$this->svar['test'] = "I'm here!";
}
}// end class
?>
> -Original Message-
> From: Richard Lynch [mailto:[EMAIL P
> -Original Message-
> From: Richard Lynch [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 01, 2001 3:52 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: issues with __sleep() and __wakeup()
>
>
> > class Scott {
> > var $svar = array(); //
> class Scott {
> var $svar = array(); // free-form hash for whatever data
> function Scott( )
> {
> return $this;
Like, I don't think you're supposed to return $this from your constructor...
> }
> function __sleep()
> {
According to the manual, this is supposed to return an array o
4 matches
Mail list logo