3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $url = "http://digitalservices.ukwm157/api/v3/packages.json?site_id=4&verbose=true&limit=1"; $parts = parse_url($url); var_dump($parts); var_dump(parse_str($parts['query']));
based on bPmXZ
Output for 7.2.0
array(4) { ["scheme"]=> string(4) "http" ["host"]=> string(23) "digitalservices.ukwm157" ["path"]=> string(21) "/api/v3/packages.json" ["query"]=> string(30) "site_id=4&verbose=true&limit=1" } Deprecated: parse_str(): Calling parse_str() without the result argument is deprecated in /in/ePcMU on line 7 NULL
Output for 5.3.20 - 7.1.10
array(4) { ["scheme"]=> string(4) "http" ["host"]=> string(23) "digitalservices.ukwm157" ["path"]=> string(21) "/api/v3/packages.json" ["query"]=> string(30) "site_id=4&verbose=true&limit=1" } NULL