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 of the
-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(); // free-form hash for whatever data
function Scott
');
}
function __wakeup() {
$this-svar['test'] = I'm here!;
}
}// end class
?
-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
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
4 matches
Mail list logo