public function getPublicSuffix($host)
    {
        if (strpos($host, '.') === 0) {
            return null;
        }

        if (strpos($host, '.') === false) {
            return null;
        }

        $host = strtolower($host);
        $parts = array_reverse(explode('.', $host));
        $publicSuffix = array();
        $psl = $this->psl;

        foreach ($parts as $part) {
            if (array_key_exists($part, $psl)
                && array_key_exists('!', $psl[$part])) {
                break;
            }

            if (array_key_exists($part, $psl)) {
                array_unshift($publicSuffix, $part);
                $psl = $psl[$part];
                continue;
            }

            if (array_key_exists('*', $psl)) {
                array_unshift($publicSuffix, $part);
                $psl = $psl['*'];
                continue;
            }

            // Avoids improper parsing when $host's subdomain + public suffix === 
            // a valid public suffix (e.g. host 'us.example.com' and public suffix 'us.com')
            break;
        }

        // Apply algorithm rule #2: If no rules match, the prevailing rule is "*".
        if (empty($publicSuffix)) {
            $publicSuffix[0] = $parts[0];
        }

        return implode('.', array_filter($publicSuffix, 'strlen'));
    }