php8.5
Home/ Manual/ rfc3986 / uri/ Uri\Rfc3986\Uri::toRawString

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.

Parameters Parameters

Return Values

Returns the recomposed raw (non-normalized) 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?baz

See Also

  • Uri\Rfc3986\Uri::toString
  • Uri\WhatWg\Url::toAsciiString
  • Uri\WhatWg\Url::toUnicodeString

Source: reference/uri/uri/rfc3986/uri/torawstring.xml · from the official PHP manual (php/doc-en)