Uri\Rfc3986\Uri::toRawString
PHP function
Edit on GitHub ✎
(PHP 8 >= 8.5.0)
Recompose the raw URI
Description
Uri\Rfc3986\Uri::toRawString(): string
Recomposes the raw (non-normalized) URI to a String.
Non-normalization
An IPv6 host is an exception: it is recomposed from its parsed form, and is therefore returned fully expanded and in lowercase, whatever notation the input used.
Parameters Parameters
Return Values
Returns the recomposed raw URI as a String.
Examples
Uri\Rfc3986\Uri::toRawString basic example
php
<?php
$uri = new \Uri\Rfc3986\Uri("https://example.com/foo/bar?baz");
echo $uri->toRawString();
?>The above example will output:
output
https://example.com/foo/bar?bazSee Also
Uri\Rfc3986\Uri::toStringUri\WhatWg\Url::toAsciiStringUri\WhatWg\Url::toUnicodeString