public function validIp($ip, $type = 'any', $strict = true)
    {
        switch ($type) {
            case 'any':
                return $this->validIpv4($ip, $strict) || $this->validIpv6($ip, $strict);
                break;
            case 'ipv4':
                return $this->validIpv4($ip, $strict);
                break;
            case 'ipv6':
                return $this->validIpv6($ip, $strict);
                break;
        }
        return false;
    }