Se, poi, è + comodo, puoi usare:

foreach($GLOBALS as $elem)
{
if (is_array($elem)) print_r($array);
else echo $elem . "
";
}