Q. What will be the output?
Code:
$a = [1,2,3];
$b = array_filter($a, function($v) { return $v > 1; });
echo count($b);
β
Correct Answer: (B)
2
Explanation: Values >1 are 2 and 3.