Skip to content

Instantly share code, notes, and snippets.

@gonzaloserrano
Created December 4, 2014 16:03
Show Gist options
  • Save gonzaloserrano/ca4c3ab2298aa72f1454 to your computer and use it in GitHub Desktop.
Save gonzaloserrano/ca4c3ab2298aa72f1454 to your computer and use it in GitHub Desktop.
readable debug_backtrace
$callStack = rtrim(array_reduce(
array_reverse(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS)),
function ($result, $call) {
return $result .= (isset($call['class']) ? $call['class'] . ':' : '') . $call['function'] . ' -> ';
}
), ' -> ') . "\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment