Skip to content

Instantly share code, notes, and snippets.

@possi
Last active December 18, 2015 13:49
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 possi/5792653 to your computer and use it in GitHub Desktop.
Save possi/5792653 to your computer and use it in GitHub Desktop.
<?php
// Include this file via:
// eval('?'.'>'.file_get_contents('https://gist.github.com/possi/5792653/raw'));
if (!function_exists("jas_dump")) {
spl_autoload_register(function($class) {
if (strpos($class, 'jas\debug\\') === 0) {
$f = "https://raw.github.com/possi/jas_debug/master/src/".str_replace('\\', '/', $class).'.php';
if (!ini_get('allow_url_fopen'|| !ini_get('allow_url_include')))
eval('?'.'>'.file_get_contents($f));
else
require_once $f;
}
}, false, true);
function jas_dump() {
return call_user_func_array(array('\jas\debug\Dumper', 'dump'), func_get_args());
}
}
@possi
Copy link
Author

possi commented Jun 16, 2013

Example usage:

eval('?'.'>'.file_get_contents('https://gist.github.com/possi/5792653/raw'));
jas_dump($this, new stdClass(), array('foo' => 'bar'));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment