-
Notifications
You must be signed in to change notification settings - Fork 1
Uri: withFragment Example
Terry L edited this page Jun 20, 2020
·
3 revisions
Shieldon\Psr7\Uri
Return an instance with the specified URI fragment.
-
param
string
fragment*
The fragment to use with the new instance. -
return
static
Example:
echo $uri->getFragment();
// Outputs: yes-i-do
$uri = $uri->withFragment('no-i-cant');
echo $uri->getFragment();
// Outputs: no-i-cant
composer require shieldon/psr-http
Shieldon PSR HTTP implementation written by Terry L. from Taiwan.