Re: References & multiple assigments
| From: | Stanislav Malyshev | Date: | Tue, 07 Nov 2000 15:33:00 +0000 |
| Subject: | Re: References & multiple assigments | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-37356@lists.php.net to get a copy of this message | ||
MG>> Doing
MG>> $c = $b = &$a;
MG>> results in $a & $b being referenced while $c╢s not.
Sure. PHP has no "&" operation, it has "=&" operation.
MG>> Shouldn╢t the above statement be the same as:
MG>> $b = &$a;
MG>> $c = &$a;
See above.
MG>> If not then I think it should be possible to write:
MG>> $c = &$b = &$a;
MG>> Currently this generates a parse error.
Well, maybe. But now it's preferable to use individual
reference-assignments.
--
Stanislav Malyshev, Zend Products Engineer
stas@zend.com http://www.zend.com/ +972-3-6139665 ext.106