Michael Moyle schreef:
Hi,
I am new to the list and have a question that inspired me to join the
list as I can not find any answer online.
When a object reference is passed to the $_SESSION array what happens to
let's assume php5. all objects are reference like, they behave from a user POV
as objects would in php4 if you passed them by reference explicitly.
that said they're not really references - there is a Sara Golemon article which
explains it ... not that I truely understand the inner machinations of the engine.
the object? Is the object serialized and saved in session (in this case
file)? Or just the reference with the object in memory remaining on the
heap?
php is 'share nothing' architecture ... everything disappears at the end of a
request - nothing remains in memory.
an object stored in $_SESSION will be automatically serialized and saved where ever
the session data is saved (usually to disk).
the only thing to remember is that you must have the class of the object stored in
$_SESSION loaded *before* you restart the session otherwise php will generate an
object of class stdClass.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php