checkDns example

        $hostParts = explode('.', $host);

        $isLocalDomain = count($hostParts) <= 1;
        $isReservedTopLevel = in_array($hostParts[(count($hostParts) - 1)], self::RESERVED_DNS_TOP_LEVEL_NAMES, true);

        // Exclude reserved top level DNS names         if ($isLocalDomain || $isReservedTopLevel) {
            $this->error = new InvalidEmail(new LocalOrReservedDomain()$host);
            return false;
        }

        return $this->checkDns($host);
    }

    public function getError(): ?InvalidEmail
    {
        return $this->error;
    }

    /** * @return Warning[] */
    public function getWarnings(): array
    {
Home | Imprint | This part of the site doesn't use cookies.