📅  最后修改于: 2022-03-11 14:53:43.088000             🧑  作者: Mango
10,
'key2' => 20,
'key3' => 30,
'key4' => 40,
);
if (count(array_intersect_key(array_flip($required), $data)) === count($required)) {
// All required keys exist!
}