update page now

Uri\WhatWg\Url::getAsciiHost

(PHP 8 >= 8.5.0)

Uri\WhatWg\Url::getAsciiHostRecupera el componente de host como un string ASCII

Descripción

public Uri\WhatWg\Url::getAsciiHost(): ?string

Recupera el componente de host como un string utilizando la transcripción punycode en lugar de caracteres Unicode.

Parámetros

Esta función no contiene ningún parámetro.

Valores devueltos

Devuelve el componente de host como un string ASCII si el componente de host existe, en caso contrario se devuelve null.

Ejemplos

Ejemplo #1 Ejemplo básico de Uri\WhatWg\Url::getAsciiHost()

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

echo
$url->getAsciiHost();
?>

El ejemplo anterior mostrará:

example.com

Ver también

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top