(PHP 8 >= 8.5.0)
Uri\WhatWg\Url::getFragment — Retrieve the fragment component
Diese Funktion besitzt keine Parameter.
Returns the fragment component as a String if the fragment component exists, null is returned otherwise.
Beispiel #1 Uri\WhatWg\Url::getFragment() basic example
<?php
$url = new \Uri\WhatWg\Url("https://example.com#foo");
echo $url->getFragment();
?>Das oben gezeigte Beispiel erzeugt folgende Ausgabe:
foo