Re: References to objects surviving being session_register()'ed
| From: | Teodor Cimpoesu | Date: | Fri, 07 Jul 2000 18:17:25 +0000 |
| Subject: | Re: References to objects surviving being session_register()'ed | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-5432@lists.php.net to get a copy of this message | ||
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