What is the difference between swap($a, $a)
and with an '&' added for swap(&$a, &$a)
<?php
function swap($x, $y) {
$x = $x + 1;
$y = $y + 2;
return $x * $y;
}
$a = 2;
$b = swap($a, $a);
print "$a, $b";
$b = swap(&$a, &$a);
print "$a, $b";
?>
Note: not asking for the answer, just wrote this so i could provide an example. Thank You.