πŸ“Š PHP
Q. What will be the output?
Code:
$a = [];
$a[] = &$a;
echo count($a);
  • (A) 1
  • (B) 2
  • (C) Error
  • (D) Infinite loop
πŸ’¬ Discuss
βœ… Correct Answer: (A) 1

Explanation: Self-referencing array still has one element.

Explanation by: Roshan
Self-referencing array still has one element.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
1
Total Visits
πŸ“½οΈ
8 d ago
Published
πŸŽ–οΈ
Roshan
Publisher
πŸ“ˆ
85%
Success Rate