Skip to content

Instantly share code, notes, and snippets.

@terpfear
Created September 21, 2015 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save terpfear/e9fdc85e91c5c4da452e to your computer and use it in GitHub Desktop.
Save terpfear/e9fdc85e91c5c4da452e to your computer and use it in GitHub Desktop.
function brokenTrace($arg1, $arg2){
backtraceWrapper();
echo "unsetting arg1\n";
unset($arg1);
echo "unsetting arg2\n";
unset($arg2);
backtraceWrapper();
}
brokenTrace("string", "anything else");
echo "\n";
function backtraceWrapper(){
$bt = debug_backtrace();
$args = $bt[1]['args'];
for($ii = 0; $ii < count($args); $ii++){
var_dump($args[$ii]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment