public static function splitURLQuery($url)
{
// decode encoded url separators
$separator = URL::getArgSeparator();
// on most places separator is still hard coded ...
if ($separator !== '&') {
// ... so always replace & with $separator
$url = str_replace(htmlentities('&'), $separator, $url);
$url = str_replace('&', $separator, $url);
}
$url = str_replace(htmlentities($separator), $separator, $url);
// end decode
$url_parts = parse_url($url);
if (!empty($url_parts['query'])) {
return explode($separator, $url_parts['query']);
} else {
return array();
}
}