|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-10-22 11:55 UTC] stas@php.net
[2000-10-23 05:29 UTC] stas@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 30 19:00:02 2025 UTC |
I use PHP4.0.3pl1 loaded as DSO module to Apache 1.3.12. I have an object, which contains another object. I found out, that if a method is called via the parent object (like $obj->obj2->method()), serialize() no longer sees the child object and hence doesn't include it to it's output. This is quite a problem, since this is default session storage method (I believe php_binary is affected too, though I've not tested that). Strange is that print_r() still prints the object correctly. This problem was NOT in 4.0.1pl2 - it's working okay with that version on the same machine. Following script reproduces the problem for me any time: <?php class l { function get() { } } class s { var $l; function s() { $this->l = new l(); } } $s = new s(); echo "<h4>before</h4>\n"; print_r($s); echo "<br>" . serialize($s); $q = $s->l->get(); echo "<h4>after</h4>\n"; print_r($s); echo "<br>" . serialize($s); ?>