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