note 119987 added to function.debug-backtrace
| From: | robert at medianis dot net | Date: | Tue, 04 Oct 2016 21:42:53 +0000 |
| Subject: | note 119987 added to function.debug-backtrace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-206774@lists.php.net to get a copy of this message | ||
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");
?>
----
Server IP: 72.52.91.14
Probable Submitter: 178.223.227.85
----
Manual Page -- http://php.net/manual/en/function.debug-backtrace.php
Edit -- https://master.php.net/note/edit/119987
Del: integrated -- https://master.php.net/note/delete/119987/integrated
Del: useless -- https://master.php.net/note/delete/119987/useless
Del: bad code -- https://master.php.net/note/delete/119987/bad+code
Del: spam -- https://master.php.net/note/delete/119987/spam
Del: non-english -- https://master.php.net/note/delete/119987/non-english
Del: in docs -- https://master.php.net/note/delete/119987/in+docs
Del: other reasons-- https://master.php.net/note/delete/119987
Reject -- https://master.php.net/note/reject/119987
Search -- https://master.php.net/manage/user-notes.php