<?php
$array = [
147 => [
"pts_m" => "",
"pts_mreg" => 1,
"pts_cg" => 1
],
158 => [
"pts_m" => null ,
"pts_mreg" => null,
"pts_cg" => 0
],
159 => [
"pts_m" => "",
"pts_mreg" => 1,
"pts_cg" => 1
]
];
var_export(
array_sum(
array_map(
fn($row) => count(array_filter($row)),
$array
)
)
);
- Output for 8.2.0 - 8.2.26, 8.3.0 - 8.3.14, 8.4.1
- 4
preferences:
40.63 ms | 405 KiB | 5 Q