Re: Serialize() doesn't serialize objects recursively?
| From: | (Daniel Convissor) | Date: | Wed, 20 Dec 2000 05:01:51 +0000 |
| Subject: | Re: Serialize() doesn't serialize objects recursively? | ||
| References: | 1 | Groups: | php.general php.general |
| Request: | Send a blank email to php-general+get-31227@lists.php.net to get a copy of this message | ||
Yev
> That's fine. I can get the functions from the class definition,
> The problem stems from the fact that if the variable is another object,
> it won't recursively serialize() that variable.. Or seems to be in my
> experience
Sorry for stating the obvious in my priror post without really answering your
question.
Hmm, now to answer your question... That's weird. I just created a simple
recursive sitiuation which worked fine under WinNT, PHP 4.0.4-dev, Apache.
<?php
class Second {
function Second() {
$this->s_a = "athing";
}
function Value() {
return "someval";
}
}
class First {
function First() {
$this->f_a = "namething";
$this->Blah();
}
function Blah() {
$this->f_b = new Second;
$this->f_c = "xyz";
$this->f_d = $this->f_b->Value();
}
}
$x = new First;
echo serialize($x);
?>
Not knowing what's in your Auth_DB class, I can't exactly comment on what's
going on. Perhaps there are no variables in there to serialize?
Enjoy,
--Dan
--
PHP scripts that make your job easier
http://www.analysisandsolutions.com/code/
SQL Solution | Layout Solution | Form Solution
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7 Ave, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net