Created
February 1, 2013 00:04
-
-
Save craiga/4687895 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Dump a simple view of the current call stack. | |
* | |
* @author Craig Anderson <[email protected]> | |
* @link https://gist.github.com/4687895 | |
*/ | |
function stackdump() { | |
$stack = debug_backtrace(); | |
foreach($stack as $stackIndex => $stackEntry) { | |
printf("%d\t%s::%s\t%s:%d\n", $stackIndex, $stackEntry["class"], $stackEntry["function"], $stackEntry["file"], $stackEntry["line"]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment