<?php
function checked($a)
{
"id",
"name",
"age",
"email",
"password",
"birthday",
"ip",
"time",
"token",
"source"
);
$i = 0;
foreach ($a as $key => $value) {
$i++;
}
}
if ($i == 10) {
$string = "Все ключи на месте, все $i";
return $string;
} else {
$string = "Найдено всего $i ключей";
return $string;
}
}
"id" => "12345",
"name" => "Nikita",
"age" => "23",
"email" => "htk@gmail.com",
"password" => "123456",
"birthday" => "12 october",
"ip" => "127.0.0.1",
"time" => "12:12",
"token" => "tok_en",
"source" => "so_ur_ce",
'hello' => 'world'
);
echo checked($a);
PD9waHAKZnVuY3Rpb24gY2hlY2tlZCgkYSkKewogICAgJGNoZWNrID0gYXJyYXkoCiAgICAgICAgImlkIiwKICAgICAgICAibmFtZSIsCiAgICAgICAgImFnZSIsCiAgICAgICAgImVtYWlsIiwKICAgICAgICAicGFzc3dvcmQiLAogICAgICAgICJiaXJ0aGRheSIsCiAgICAgICAgImlwIiwKICAgICAgICAidGltZSIsCiAgICAgICAgInRva2VuIiwKICAgICAgICAic291cmNlIgogICAgKTsKICAgICRpICAgICA9IDA7CiAgICBmb3JlYWNoICgkYSBhcyAka2V5ID0+ICR2YWx1ZSkgewogICAgICAgIGlmIChpbl9hcnJheSgka2V5LCAkY2hlY2spKSB7CiAgICAgICAgICAgICRpKys7CiAgICAgICAgfQogICAgfQogICAgaWYgKCRpID09IDEwKSB7CiAgICAgICAgJHN0cmluZyA9ICLQktGB0LUg0LrQu9GO0YfQuCDQvdCwINC80LXRgdGC0LUsINCy0YHQtSAkaSI7CiAgICAgICAgcmV0dXJuICRzdHJpbmc7CiAgICB9IGVsc2UgewogICAgICAgICRzdHJpbmcgPSAi0J3QsNC50LTQtdC90L4g0LLRgdC10LPQviAkaSDQutC70Y7Rh9C10LkiOwogICAgICAgIHJldHVybiAkc3RyaW5nOwogICAgfQp9CiRhID0gYXJyYXkoCiAgICAiaWQiID0+ICIxMjM0NSIsCiAgICAibmFtZSIgPT4gIk5pa2l0YSIsCiAgICAiYWdlIiA9PiAiMjMiLAogICAgImVtYWlsIiA9PiAiaHRrQGdtYWlsLmNvbSIsCiAgICAicGFzc3dvcmQiID0+ICIxMjM0NTYiLAogICAgImJpcnRoZGF5IiA9PiAiMTIgb2N0b2JlciIsCiAgICAiaXAiID0+ICIxMjcuMC4wLjEiLAogICAgInRpbWUiID0+ICIxMjoxMiIsCiAgICAidG9rZW4iID0+ICJ0b2tfZW4iLAogICAgInNvdXJjZSIgPT4gInNvX3VyX2NlIiwKJ2hlbGxvJyA9PiAnd29ybGQnCik7CmVjaG8gY2hlY2tlZCgkYSk7