tags:

views:

57

answers:

3

In this example, what does the & accomplish?

+2  A: 

& indicates that the variable is accessed by reference rather than by value. See the PHP documentation on references for further information.

Asaph
+4  A: 

It makes the parameter pass by reference, instead of pass by value.

From php5 and above, it is not necessary to pass objects by reference anymore.

Ikke
+3  A: 

The ampersand means the function gets a reference to the variable. The php manual can explain it better than i can!

http://php.net/manual/en/language.references.php

adam