Skip to content

Instantly share code, notes, and snippets.

@angad
Created December 29, 2013 01:17
Show Gist options
  • Save angad/8166345 to your computer and use it in GitHub Desktop.
Save angad/8166345 to your computer and use it in GitHub Desktop.
php call stack
private function get_callstack($delim="\n") {
$dt = debug_backtrace();
$cs = '';
foreach ($dt as $t) {
$cs .= $t['file'] . ' line ' . $t['line'] . ' calls ' . $t['function'] . "()" . $delim;
}
return $cs;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment