在循环中正确使用PHP Superglobals

I'm trying to clean up some code and am getting a warning

"Do not Access Superglobal $_GET Array Directly"

on a loop that is used to collect what was returned.

foreach ($_GET as $name => $value) {
    $allinfo.= "_GET = $name : $value<br>";
}

Now is is nice and easy to do individual records so

$token = $_REQUEST['token'];

becomes

$token = filter_input(INPUT_REQUEST, 'token');

but I'm slightly stuck on how to fix this for loops.

foreach ($_GET as $name => $value) {
    $allinfo.= "_GET = $name : " . filter_input(INPUT_GET, $name) . "<br>";
}

OR

foreach (filter_input_array(INPUT_GET) as $name => $value) {
    $allinfo.= "_GET = $name : $value <br>";
}
foreach ($_GET as $name => $value) {
    $allinfo.= "_GET = $name : " . filter_input(INPUT_GET, $name) . "<br>";
}

I don't know if this is enough for your code validator (Netbeans I guess). You can also try:

foreach (array_keys($_GET) as $name) {
    $allinfo.= "_GET = $name : " . filter_input(INPUT_GET, $name) . "<br>";
}