public static function contains($cidr, $ip)
    {
        $cidr = Range::parse($cidr);

        $ip = new IP($ip);

        if ($cidr->getFirstIP()->getVersion() !== $ip->getVersion()) {
            return false;
        }

        return $cidr->contains($ip);
    }