note 78565 deleted from function.debug-backtrace by googleguy
| From: | googleguy@php.net | Date: | Wed, 16 Oct 2013 14:43:52 +0000 |
| Subject: | note 78565 deleted from function.debug-backtrace by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-196564@lists.php.net to get a copy of this message | ||
Note Submitter: misterpib at gmail dot com
----
You should probably try to avoid changing any of the items in the args array. Consider this example:
----------
function a(&$value)
{
echo "start a: $value\n";
b();
echo "end a: $value\n";
}
function b()
{
echo "start b\n";
$stack = debug_backtrace();
$stack[1]['args'][0] = 'bob';
echo "end b\n";
}
$mynum = 42;
a($mynum);
--------------
This prints:
start a: 42
start b
end b
end a: bob