Skip to content

Instantly share code, notes, and snippets.

@SocalNick
Created September 27, 2011 18:37
Show Gist options
  • Save SocalNick/1245862 to your computer and use it in GitHub Desktop.
Save SocalNick/1245862 to your computer and use it in GitHub Desktop.
Handy debug_backtrace function for PHP
function my_debug_backtrace() {
$backtrace = debug_backtrace();
$function = create_function('$a,$b','print "{$a[\'function\']}()(".$a[\'file\'].":{$a[\'line\']});\n";');
array_walk($backtrace, $function);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment