What do you mean by adding a & symbol to the method name in the class file?
class Foo {
public $value = 42;
Public Function &getvalue () {
return $this->value;
}
}
What does the pre-GetValue & symbol in the above code mean? What role does it have?
------to solve the idea----------------------
$var = GetValue ();
$var = &getvalue ();
The difference between the two, you look at it.
------to solve the idea----------------------
A leading & representation can return a reference
If the e_strict level error check is not turned on, then there are no identical. Otherwise, it will produce
Strict Standards: Only variables should is assigned by reference
$p = new Foo;
echo $n =& $p->getvalue ();
$n + +;
echo $p->getvalue ();
------to solve the idea----------------------
The name of the function is replaced by a variable, here can be understood as a reference, I answer the question is never a metaphor, do not bend the corner, let you lung solution.