Created
March 10, 2014 20:29
-
-
Save meeuw/9473632 to your computer and use it in GitHub Desktop.
log php backtrace to a file
This file contains 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 | |
$dmdbtf = fopen('/home/meeuw/log.txt', 'w'); | |
function dmdbt($bt) { | |
global $dmdbtf; | |
if (isset($bt[0]['class']) && isset($bt[1]['class'])) { | |
fwrite($dmdbtf, "\"{$bt[1]['class']} {$bt[1]['function']}\" -> ". | |
"\"{$bt[0]['class']} {$bt[0]['function']}\"\n" | |
); | |
fflush($dmdbtf); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment