[thelist] php operator =&

Mike Nowak Mike.Nowak at arcww.com
Mon Jun 12 14:50:49 CDT 2006


>>> mrsanders at designshift.com 6/12/2006 3:39:30 PM >>>
I'm helping someone out with some PHP code, and I keep seeing them using
the operator "=&", which AFAIK is not a PHP operator... but it seems to
work fine, as though it were a simple assignment operator (i.e. "=").

Before I go telling him that he shouldn't be using it (for the sake of
code readability, at least), does someone know of some obscure part of
the PHP docs that mentions this operator? Or perhaps he's confusing it
with an operator from some other language?

----


It IS PHP and it IS perfectly fine, depending on the situation and context. He's assigning a  reference to the variable rather than the variable itself. 
http://ca3.php.net/references 





More information about the thelist mailing list