src/Hostname.php
public function getDomainName(): string
    {
        return $this->myDomainParts[count($this->myDomainParts) - 1] . ($this->myTld !== null ? '.' . $this->myTld : '');
    }
public function getDomainName(): string
    {
        return $this->myDomainParts[count($this->myDomainParts) - 1] . ($this->myTld !== null ? '.' . $this->myTld : '');
    }
public function getDomainName ( ) : string { return $ this -> myDomainParts [ count ( $ this -> myDomainParts ) - 1 ] . ( $ this -> myTld !== null ? '.' . $ this -> myTld : '' ) ; }
Returns the domain name including top-level domain.

@since 1.0.0

@return string The domain name including top-level domain.
Returns the domain name including top - level domain .