array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ru', ), 'this' => array ( 0 => 'uri-whatwg-url.toasciistring.php', 1 => 'Uri\\WhatWg\\Url::toAsciiString', 2 => 'Recompose the URL as an ASCII string', ), 'up' => array ( 0 => 'class.uri-whatwg-url.php', 1 => 'Uri\\WhatWg\\Url', ), 'prev' => array ( 0 => 'uri-whatwg-url.serialize.php', 1 => 'Uri\\WhatWg\\Url::__serialize', ), 'next' => array ( 0 => 'uri-whatwg-url.tounicodestring.php', 1 => 'Uri\\WhatWg\\Url::toUnicodeString', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/uri/uri/whatwg/url/toasciistring.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

Uri\WhatWg\Url::toAsciiString

(PHP 8 >= 8.5.0)

Uri\WhatWg\Url::toAsciiStringRecompose the URL as an ASCII string

Описание

public Uri\WhatWg\Url::toAsciiString(): string

Recomposes the URL as an ASCII string, using punycode transcription instead of Unicode characters in the host component.

Список параметров

Сигнатура функции не содержит параметров.

Возвращаемые значения

Returns the recomposed URL as an ASCII string.

Примеры

Пример #1 Uri\WhatWg\Url::toAsciiString() basic example

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

echo
$url->toAsciiString();
?>

Результат выполнения приведённого примера:

https://example.com/foo/bar?baz

Смотрите также