Uri\Rfc3986\Uri::getRawFragment
PHP function
Edit on GitHub ✎
(PHP 8 >= 8.5.0)
Retrieve the raw fragment component
Description
Uri\Rfc3986\Uri::getRawFragment(): string|null
Retrieves the raw (non-normalized) fragment component.
Parameters Parameters
Return Values
Returns the raw fragment component as a String if the fragment component exists, null is returned otherwise.
Examples
Uri\Rfc3986\Uri::getRawFragment basic example
php
<?php
$uri = new \Uri\Rfc3986\Uri("https://example.com#foo=bar");
echo $uri->getRawFragment();
?>The above example will output:
output
foo=barSee Also
Uri\Rfc3986\Uri::getFragmentUri\Rfc3986\Uri::withFragmentUri\WhatWg\Url::getFragment