Skip to content

Instantly share code, notes, and snippets.

View EvanDarwin's full-sized avatar
💭
Always busy with something

Evan Darwin EvanDarwin

💭
Always busy with something
  • USA
View GitHub Profile
@EvanDarwin
EvanDarwin / stack_trace.php
Created October 7, 2012 05:44 — forked from JaggedJax/stack_trace.php
Simple human readable stack trace for PHP scripts or Web
/**
* Print out a stack trace from entry point to wherever this function was called.
* @param boolean $show_args Show arguments passed to functions? Default False.
* @param boolean $for_web Format text for web? Default True.
* @param boolean $return Return result instead of printing it? Default False.
*/
public static function stack_trace($show_args=false, $for_web=true, $return=false){
if ($for_web){
$before = '<b>';
$after = '</b>';