NYCPHP Meetup

NYPHP.org

[nycphp-talk] PHP4 OOP Serialization

Frank Wong frank_wong2 at informationideas.com
Thu Feb 24 22:15:26 EST 2005


Can someone shed some light on the following issue?

1: I have an object, A, that I create on a page.
2: Object A's constructor create an object, B and is stored in a variable in
object A.
3: I register object A as a session variable.
4: On my next page, I grab object A from the session and everything is fine.
5: I try to get object B from object A and it is not an object.

All objects definitions occur before session_start().

Is that the way object serialization supposed to work in PHP4?

If so, what is the best alternative to having an object within an object?

TIA

________________________
Frank Wong





More information about the talk mailing list