Q. What will be the output?
Code:
function test(&$x) { $x = $x * 2; }
$a = 5;
test($a);
echo $a;
β
Correct Answer: (B)
10
Explanation: Pass by reference modifies original variable.