Skip to content

Uri: getQuery Example

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

Shieldon\Psr7\Uri

getQuery

Retrieve the query string of the URI.

  • return string

Example:

$uri = new \Shieldon\Psr7\Uri(
    'https://example.com/post/?p=113&foo=bar#yes-i-do'
);

echo $uri->getQuery();
// Outputs: p=113&foo=bar