Q. What will be the output?

Code:
$a = 5;
function test($a) {
  $a = 10;
}
test($a);
echo $a;
  • (A) 5
  • (B) 10
  • (C) Error
  • (D) NULL
💬 Discuss
✅ Correct Answer: (A) 5
Explanation: Passed by value, original variable unchanged.
Explanation by: Roshan
Passed by value, original variable unchanged.

💬 Discussion


📊 Question Analytics

👁️
31
Total Visits
📽️
5 mo ago
Published
🎖️
Roshan
Publisher
📈
90%
Success Rate