public function isWildcardDomain(string $domain): bool
    {
        $domain = rtrim($domain, '.').'.';
        $pattern = '/^\*\.(?:[a-zA-Z0-9\-\_]+\.)*$/';

        return (bool) preg_match($pattern, $domain);
    }
public function isWildcardDomain(string $domain): bool
    {
        $domain = rtrim($domain, '.').'.';
        $pattern = '/^\*\.(?:[a-zA-Z0-9\-\_]+\.)*$/';

        return (bool) preg_match($pattern, $domain);
    }
public function isWildcardDomain ( string $ domain ) : bool { $ domain = rtrim ( $ domain , '.' ) . '.' ; $ pattern = '/^\*\.(?:[a-zA-Z0-9\-\_]+\.)*$/' ; return ( bool ) preg_match ( $ pattern , $ domain ) ; }
Determine if a domain is a wildcard domain.

@param string $domain

@return bool
Determine if a domain is a wildcard domain .