Skip to content

Instantly share code, notes, and snippets.

@olavmrk
Created May 28, 2015 17:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save olavmrk/ff5f9b71c98294fae825 to your computer and use it in GitHub Desktop.
Save olavmrk/ff5f9b71c98294fae825 to your computer and use it in GitHub Desktop.
Dump PHP superglobals
<?php
header('Content-Type: text/plain; charset=utf-8');
foreach (array('_GET', '_POST', '_REQUEST', '_COOKIE', '_SERVER', '_ENV') as $v) {
echo '$' . $v . ' = ' . var_export($$v, TRUE) . ";\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment