Created
September 21, 2015 17:30
-
-
Save terpfear/e9fdc85e91c5c4da452e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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