what does '=&' means?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tri9999
Forum Newbie
Posts: 1
Joined: Mon Jul 07, 2008 4:26 pm

what does '=&' means?

Post by tri9999 »

Hi,

I'm new to php. I came across php codes with something like this:

$this->th->ss =& $this->ss;

What does the operator '=&' mean??? Is it pointer dereference??

I've never encounter '=&' in any of the tutorials I've read. So can someone explain to me what it is and give an example?


Thanks for helping,

-Tri
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: what does '=&' means?

Post by Eran »

it means pass by reference instead of by value. In PHP5 objects are passed by reference by default, and everything else is passed by value. Also, run-time pass-by-reference will raise a warning on PHP5 as its considered bad practice (causes hard to debug bugs).
Post Reply