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

πŸ‘οΈ
20
Total Visits
πŸ“½οΈ
4 mo ago
Published
πŸŽ–οΈ
Roshan
Publisher
πŸ“ˆ
87%
Success Rate