note 85915 deleted from function.debug-backtrace by danbrown
| From: | danbrown@php.net | Date: | Fri, 09 Apr 2010 00:25:49 +0000 |
| Subject: | note 85915 deleted from function.debug-backtrace by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-168053@lists.php.net to get a copy of this message | ||
Note Submitter: Force Flow
----
I think I worked out an easy way to get the trace printed out in an easily readable format with
minimal code:
<?php
echo parse_backtrace(debug_backtrace());
function parse_backtrace($raw){
$output="";
foreach($raw as $entry){
$output.="\nFile: ".$entry['file']." (Line:
".$entry['line'].")\n";
$output.="Function: ".$entry['function']."\n";
$output.="Args: ".implode(", ", $entry['args'])."\n";
}
return $output;
}
?>