« Uri\WhatWg\Url::getScheme
Uri\WhatWg\Url::getUsername »

Uri\WhatWg\Url::getUnicodeHost

(PHP 8 >= 8.5.0)

Uri\WhatWg\Url::getUnicodeHost — ホストコンポーネントを Unicode string として取得する

説明

public function Uri\WhatWg\Url::getUnicodeHost(): ?string

ホストコンポーネントを string として取得します。Unicode 文字を含む可能性があります。

パラメータ

この関数にはパラメータはありません。

戻り値

ホストコンポーネントが存在する場合は Unicode string としてホストコンポーネントを返し、存在しない場合は null を返します。

例

例1 Uri\WhatWg\Url::getUnicodeHost() の基本的な例

<?php
$url = new \Uri\WhatWg\Url("https://example.com");

echo $url->getUnicodeHost();
?>

上の例の出力は以下となります。

example.com

参考

関連キーワード:
ホスト   コンポーネント   WhatWg   Unicode   getUnicodeHost   example   正規化   getScheme   getUsername   可能性   基本的   https   参考   getAsciiHost   withHost   getRawHost   getHost
関連する関数・ページ:
uri-whatwg-url.getasciihost   uri-whatwg-url.withhost   uri-rfc3986-uri.getrawhost   uri-rfc3986-uri.gethost   class.uri-whatwg-url   uri-rfc3986-uri.withhost