Re: Small riddle with classes and references, or bug?
| From: | rush | Date: | Mon, 22 Dec 2003 11:43:40 +0000 |
| Subject: | Re: Small riddle with classes and references, or bug? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-173144@lists.php.net to get a copy of this message | ||
"Messju Mohr" <messju@lammfellpuschen.de> wrote in message
news:20031222113341.GA18833@dpo.de...
> this creates a reference from $rme to $GLOBALS['rme']
>
> > $rme = & $this;
>
> this create a *new* reference from $rme to $this. so only a local $rme
> is referencing $this now. change the line to
>
> $GLOBALS['rme'] = & $this;
>
> to get the expected behaviour.
Thank you very much, I was not aware that global $something is just a syntax
sugar for reference into the $GLOBALS array.
Very spookey indeed, but thanks again :)
rush
--
http://www.templatetamer.com/