function ip_in_cidrs($ip, $cidrs) { foreach ((array) $cidrs as $cidr) { if ($this->ip_in_cidr($ip, $cidr)) { return $cidr; } } return false; }