3v4l.org

run code in 300+ PHP versions simultaneously
<?php $brokenUri = 'https://domain.com/?abc=1212&campaignid=%campaignid%&adid=%bannerid%'; $brokenUri = parse_url($brokenUri); var_dump($brokenUri); // we need encoded input string $brokenUri['query'] = urlencode($brokenUri['query']); var_dump($brokenUri['query']); // result parse_str($brokenUri['query'], $brokenUri['query']); var_dump($brokenUri['query']);

preferences:
28.57 ms | 410 KiB | 5 Q