$$a = b; in PHP means "accept the value of $a and set a variable whose name is equal to the value of b ".
In other words:
$foo = "bar"; $$foo = "baz"; echo $bar; // outputs 'baz'
But yes, look at the link to the PHP symbol .
As for the call by value / reference - the main difference between them is whether you can change the original elements that were used to call the function. Cm:
function increment_value($y) { $y++; echo $y; } function increment_reference(&$y) { $y++; echo $y; } $x = 1; increment_value($x); // prints '2' echo $x; // prints '1' increment_reference($x); // prints '2' echo $x; // prints '2'
Note that the value of $x does not change to increment_value() , but changes to increment_reference() .
As shown here, whether a call by value or a call by reference is used depends on the definition of the function being called; by default, when declaring your own functions, it is the callsign (but you can specify "call by reference" with the & sigil).
source share