Skip to content

Instantly share code, notes, and snippets.

@epixa
Created July 10, 2012 12:52
Show Gist options
  • Select an option

  • Save epixa/3083072 to your computer and use it in GitHub Desktop.

Select an option

Save epixa/3083072 to your computer and use it in GitHub Desktop.
<?php
function blah($foo, $bar)
{
echo implode("\n", array_map(function($step) {
extract($step);
return sprintf('%s(%s) called at [%s:%d]', $function, implode(', ', $args), $file, $line);
}, debug_backtrace())) . "\n";
};
function another()
{
blah('lol', 'ok');
}
another();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment