- parse_str: documentation ( source)
- print_r: documentation ( source)
- parse_url: documentation ( source)
<?php
declare(strict_types=1);
$url = 'https://localhost/api?field.filter=foo';
// Parse the URL.
$parsed = parse_url($url);
// Parse the query string.
parse_str($parsed['query'], $parsed['query']);
print_r($parsed);