Skip to content

Instantly share code, notes, and snippets.

@terpfear
Created Sep 21, 2015
Embed
What would you like to do?
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