Q. What will be the output?
Code:
$a = [1,2,3];
array_walk($a, function(&$v) { $v *= 2; });
print_r($a);
β
Correct Answer: (B)
[2,4,6]
Explanation: Values modified using reference in callback.