πŸ“Š PHP
Q. What will be the output?
Code:
$a = 0;
echo $a ?: 'fallback';
  • (A) fallback
  • (B) 0
  • (C) Error
  • (D) NULL
πŸ’¬ Discuss
βœ… Correct Answer: (A) fallback

Explanation: Ternary shortcut treats 0 as false.

Explanation by: Roshan
Ternary shortcut treats 0 as false.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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