Skip to content

Instantly share code, notes, and snippets.

@saihtaM
Created July 2, 2012 03:55
Show Gist options
  • Save saihtaM/3030979 to your computer and use it in GitHub Desktop.
Save saihtaM/3030979 to your computer and use it in GitHub Desktop.
Dumping variables
import pprint
pprint.pprint(globals())
pprint.pprint(locals())
<pre><?php
// https://gist.github.com/3030979
// This... well... the code is pretty much self explaining..
echo "<b>POST:\n</b>";
var_dump($_POST);
echo "<b>GET:\n</b>";
var_dump($_GET);
echo "<b>FILES:\n</b>";
var_dump($_FILES);
echo "<b>SESSION:\n</b>";
var_dump($_SESSION);
echo "<b>COOKIE:\n</b>";
var_dump($_COOKIE);
echo "<b>SERVER:\n</b>";
var_dump($_SERVER);
?></pre>
print vars(foo),vars(bar)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment