Skip to content

Uri: __toString Example

Terry L edited this page Jun 20, 2020 · 3 revisions
Clone this wiki locally

Shieldon\Psr7\Uri

__toString

Return the string representation as a URI reference.

  • return string

Example:

$uri = new Uri('http://example.com:8888/demo/#section-1');

echo $uri;
// Outputs: http://example.com:8888/demo/#section-1