CodeExplorer parseHostPort example
'crypto_method' =>
$cryptoMethod,
],
static fn ($v) => null !==
$v),
'socket' =>
[ 'bindto' =>
$options['bindto'
],
'tcp_nodelay' => true,
],
];
$context =
stream_context_create($context,
['notification' =>
$notification]);
$resolver =
static function D
$multi) use ($context,
$options,
$url, &
$info,
$onProgress) { [$host,
$port] = self::
parseHostPort($url,
$info);
if (!
isset($options['normalized_headers'
]['host'
])) { $options['headers'
][] = 'Host: '.
$host.
$port;
} $proxy = self::
getProxy($options['proxy'
],
$url,
$options['no_proxy'
]);
if (!self::
configureHeadersAndProxy($context,
$host,
$options['headers'
],
$proxy, 'https:' ===
$url['scheme'
])) { $ip = self::
dnsResolve($host,
$multi,
$info,
$onProgress);
$url['authority'
] =
substr_replace($url['authority'
],
$ip, -\
strlen($host) - \
strlen($port), \
strlen($host));
}