Skip to content

Instantly share code, notes, and snippets.

@randomecho
Last active October 3, 2015 07:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save randomecho/2421536 to your computer and use it in GitHub Desktop.
Save randomecho/2421536 to your computer and use it in GitHub Desktop.
Ugly dump of the variable used, needing something that was easily seen on the page
function dump($thevar, $killme = false)
{
echo "\n\n".'<pre style="text-align:left;color:#000;background:#fff;padding:1em;border:1px dotted #ccc;margin:1em 0;clear:both;">'."\n\n";
print_r($thevar);
if (is_object($thevar))
{
echo "\n\nmethods on this object";
print_r(get_class_methods($thevar));
}
echo "</pre>\n\n";
if ($killme)
exit();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment