Skip to content

Instantly share code, notes, and snippets.

@amad
Created August 30, 2013 15:32
Show Gist options
  • Save amad/6391067 to your computer and use it in GitHub Desktop.
Save amad/6391067 to your computer and use it in GitHub Desktop.
<?php
function shutdown_find_exit()
{
var_dump($GLOBALS['dbg_stack']);
}
register_shutdown_function('shutdown_find_exit');
function write_dbg_stack()
{
$GLOBALS['dbg_stack'] = debug_backtrace();
}
register_tick_function('write_dbg_stack');
declare(ticks=1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment