1990) { $age = (int)date('Y') - $metadata["birth"]["year"] + (strtotime(date('Y') . "-" . $metadata["birth"]["date"]) <= time() ? 0 : -1); } if (is_string($age) && isset(explode("-", $age)[1]) && is_numeric(explode("-", $age)[1])) { $age = (int)explode("-", $age)[1]; } if ($age > 0 && $age <= 10) { $metadata["little"] = 2; } else if ($age > 0 && $age <= 15) { $metadata["little"] = 3; } return $metadata; }