Skip to content

Instantly share code, notes, and snippets.

@justingreerbbi
Created December 2, 2020 18:24
Show Gist options
  • Save justingreerbbi/6219b406a4e4417067744effb0e8f460 to your computer and use it in GitHub Desktop.
Save justingreerbbi/6219b406a4e4417067744effb0e8f460 to your computer and use it in GitHub Desktop.
Friendly PHP Backtrace
function wp_oauth_server_debug_backtrace() {
$friendly = array();
$backtrace = debug_backtrace();
foreach ( $backtrace as $file ) {
$friendly[] = array(
'file' => $file['file'],
'function' => $file['function'],
'line' => $file['line']
);
}
return $friendly;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment