Uri\Rfc3986\Uri::getRawHost
PHP function
Edit on GitHub ✎
(PHP 8 >= 8.5.0)
Retrieve the raw host component
Description
Uri\Rfc3986\Uri::getRawHost(): string|null
Retrieves the raw (non-normalized) host component.
Parameters Parameters
Return Values
Returns the raw host component as a String if the host component exists, null is returned otherwise.
Examples
Uri\Rfc3986\Uri::getRawHost basic example
php
<?php
$uri = new \Uri\Rfc3986\Uri("https://example.com");
echo $uri->getRawHost();
?>The above example will output:
output
example.comSee Also
Uri\Rfc3986\Uri::getHostUri\Rfc3986\Uri::withHostUri\WhatWg\Url::getAsciiHostUri\WhatWg\Url::getUnicodeHost