|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-05-26 19:25 UTC] iliaa@php.net
[2004-05-26 19:58 UTC] dayal at capital-merchant dot com
[2004-07-05 11:29 UTC] moriyoshi@php.net
[2004-07-06 17:09 UTC] dayal at capital-merchant dot com
[2004-12-13 01:03 UTC] sniper@php.net
[2004-12-21 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 23:00:01 2025 UTC |
Description: ------------ I have a php class Customer which has and Object variable 'Address'. The class 'Address' in turn has an object variable 'Zip'. Customer Address Zip In the file 'CustomerTest.php' - I am creating a new Zip object and assigning this zip object to a new Address object which in turn is assigned to a new Customer object. Now I am printing the instance variables of the Zip object (two String values). After this I am assigning a new Zip object to the above 'Address object' and again printing the instance variables of the Zip object to the screen. As expected these values differ from the above print command. Now I am assigning the Customer object to SESSION. Now on a different php page using the Customer object stored in session, if I print the instance variables of zip object, I get the OLD VALUES but not the new ones which I have modified. I reproduced the same code using servlets which functioned properly as expected unlike php. Please look into this. Reproduce code: --------------- http://198.92.233.203/temp/CustomerTest.php Expected result: ---------------- Zip1: 333 Zip2: 444 Actual result: -------------- Zip1: 123 Zip2: 345