Q. What will be the output?
Code:
$x = 10;
function test() {
echo $x;
}
test();
β
Correct Answer: (C)
Error/Undefined variable
Explanation: Variable not available inside function without global or parameter.