checkIPv6() public method

Checks if the given IP is IPv6-compatible
public checkIPv6 ( string $ip ) : boolean
$ip string a valid IPv6-address
return boolean true if $ip is an IPv6 address
 public function set_host($host)
 {
     if ($host === null || $host === '') {
         $this->host = null;
         $this->valid[__FUNCTION__] = true;
         return true;
     } elseif ($host[0] === '[' && substr($host, -1) === ']') {
         if (SimplePie_Net_IPv6::checkIPv6(substr($host, 1, -1))) {
             $this->host = $host;
             $this->valid[__FUNCTION__] = true;
             return true;
         } else {
             $this->host = null;
             $this->valid[__FUNCTION__] = false;
             return false;
         }
     } else {
         $this->host = $this->replace_invalid_with_pct_encoding($host, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~!$&\'()*+,;=', SIMPLEPIE_LOWERCASE);
         $this->valid[__FUNCTION__] = true;
         return true;
     }
 }