Just a short note on debug_backtrace options for PHP 5.3.6 or newer:
debug_backtrace() - show all options
debug_backtrace(0) - exlude ["object"]
debug_backtrace(1) - same as debug_backtrace()
debug_backtrace(2) - exlude ["object"] AND ["args"]
use this example and try calling debug_backtrace with different options
<?php
function F1()
{
echo "<br />";
echo "in F1 now";
echo "<pre>".print_r(debug_backtrace(2),true)."</pre>";
}
class DebugOptionsTest
{
function F2()
{
echo "<br />";
echo "in F2 now";
F1();
}
}
echo "<hr />calling F1";
F1();
$c=new DebugOptionsTest();
echo "<hr /><hr /><hr />calling F2";
$c->F2("testValue");
?>