Last active
December 18, 2015 13:49
-
-
Save possi/5792653 to your computer and use it in GitHub Desktop.
OnTheFly-Include to https://github.com/possi/jas_debug-Package
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example usage: