core-bundle/src/Routing/UrlGenerator.php
private function getHostAndPort(string $domain): array
    {
        if (false !== strpos($domain, ':')) {
            return explode(':', $domain, 2);
        }

        return [$domain, null];
    }
private function getHostAndPort(string $domain): array
    {
        if (false !== strpos($domain, ':')) {
            return explode(':', $domain, 2);
        }

        return [$domain, null];
    }
Extracts host and port from the domain.

@return (string|null)[]