Well, it means a pointer to the variable. Usually, inside functions, the variable is passed and inside the function, a copy is used during the lifespan of the function. So…
function Ernie($var1, $var2) {
$var1 = 0;
return $var1;
}
This would always return zero, but, NEVER EVER touch the orginal $var1’s values.
But, this version:
function Ernie(&var1, $var2) {
$var1 = 0;
return $var1;
}
Would set the original variable “$var1” to zero and it will be altered by this function. In most cases, it is not used often as it is hard to follow the logic of the entire function process. Here is what the description actually says for this type of process:
The & operator tells PHP not to copy the array when passing it to the function. Instead, a reference to the array is passed into the function, thus the function modifies the original array instead of a copy.
( Basically what I just said… )