What is the meaning of & in this sentence in PHP?

Asked

Viewed 38 times

2

Sentenca:

foreach ($this->table as $alias => &$tableObject) {
    $tableObject = clone $tableObject;
}

What is the meaning of & before the variable $tableObject? I have seen some codes that have & before any var only one character and not 2 as AND(&&) always before some variable? Can someone explain me, or at least tell me the name so I can do a better search.

Thank you.

  • where is the duplicate question? bfavaretto

  • In the link above, at the top of your question. The answers you have there did not clarify your question? NOTE: please mention my name with @in front, otherwise I will not be notified.

  • OK, I thought, thanks for the guidance.

  • If those contents don’t resolve, explain to me here the question that I help.

  • Thanks, but this well explained and still has other reference links in the answers. Vlw.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.