PHP - Nice Debug Trace



<?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;
}
?>

Leave a Reply

You must be logged in to post a comment.