Q. What will be the output?

Code:
$a = 'abc';
$b = &$a;
$b = 'xyz';
echo $a;
  • (A) abc
  • (B) xyz
  • (C) Error
  • (D) NULL
πŸ’¬ Discuss
βœ… Correct Answer: (B) xyz
Explanation: Reference assignment updates original variable.
Explanation by: Roshan
Reference assignment updates original variable.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
18
Total Visits
πŸ“½οΈ
3 mo ago
Published
πŸŽ–οΈ
Roshan
Publisher
πŸ“ˆ
92%
Success Rate