Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2000071

Re: [PHP] References to objects surviving being session_register()'ed From: Teodor Cimpoesu (teo <email protected>)
Date: 07/07/00

Hi Peter!
On Fri, 07 Jul 2000, Peter T. Hansen wrote:

> Please help.
>
> It seems that if you make two variables that are _references_ to the same
> object and then call session_register() with the variables, then on the next
> php-page the two variables are distinct _copies_ of the object.
makes sense
if you look closer to the code, you'll see it serialize the *value* and
a reference is a different beast.

Evetually you can restore the reference to a variable in a __wakeup() hook.
See Thies (or was he Andrei?) example with the file descriptor.

-- teodor

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>