$keys = ['online', 'count', 'status'];
$filter = function ($key) use ($keys){
return in_array($key, $keys);
}
foreach ($online as $key => $value) {
$online[$key] = array_filter($value, $filter, ARRAY_FILTER_USE_KEY);
}
$online = array_merge(array_fill_keys($keys, null), $online);