Re: Understanding the =& operator...
| From: | @ Edwin | Date: | Fri, 25 Oct 2002 20:48:33 +0000 |
| Subject: | Re: Understanding the =& operator... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-121477@lists.php.net to get a copy of this message | ||
Hello,
"Chris Boget" <chris@wild.net> wrote:
> Ok, let me see if I have this right:
>
> When you do:
>
> $var = new myClass();
>
> $var instantiates and holds a copy of myClass. But when
> you do:
>
> $var =& new myClass();
>
> $var instantiates and references that instantiation?
>
> If so, then I'm curious - if you do:
>
> $var2 =& new myClass();
>
Perhaps, you meant:
$var2 =& $var;
Then changing something in $var2 will also change it in $var, no?
- E
...[snip]...