array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'uk', ), '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); ?>
(PHP 8 >= 8.5.0)
Uri\WhatWg\Url::toAsciiString — Recompose the URL as an ASCII 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