Q. What will be the output?

Code:
$a = [1,2,3];
$b = array_filter($a, function($v) { return $v > 1; });
echo count($b);
  • (A) 1
  • (B) 2
  • (C) 3
  • (D) Error
πŸ’¬ Discuss
βœ… Correct Answer: (B) 2
Explanation: Values >1 are 2 and 3.
Explanation by: Roshan
Values >1 are 2 and 3.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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