(PHP 8 >= 8.5.0)
Uri\WhatWg\Url::getQuery — Retrieve the query component
Retrieves the query component.
This function has no parameters.
Returns the query component as a string if the query component exists, null is returned otherwise.
null
Example #1 Uri\WhatWg\Url::getQuery() basic example
<?php $url = new \Uri\WhatWg\Url("https://example.com?foo/bar"); echo $url->getQuery(); ?>
The above example will output:
foo/bar