src/Hostname.php
public function equals(HostnameInterface $hostname): bool
    {
        return $this->getDomainParts() === $hostname->getDomainParts() && $this->getTld() === $hostname->getTld();
    }
public function equals(HostnameInterface $hostname): bool
    {
        return $this->getDomainParts() === $hostname->getDomainParts() && $this->getTld() === $hostname->getTld();
    }
public function equals ( HostnameInterface $ hostname ) : bool { return $ this -> getDomainParts ( ) === $ hostname -> getDomainParts ( ) && $ this -> getTld ( ) === $ hostname -> getTld ( ) ; }
Returns true if the hostname equals other hostname, false otherwise.

@since 1.2.0

@param HostnameInterface $hostname The other hostname.

@return bool True if the hostname equals other hostname, false otherwise.
Returns true if the hostname equals other hostname false otherwise .