debug_backtrace does not behave as documented
| From: | Magnus Määttä | Date: | Thu, 08 Apr 2004 11:31:02 +0000 |
| Subject: | debug_backtrace does not behave as documented | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-8998@lists.php.net to get a copy of this message | ||
Hello
debug_backtrace() used to print out arguments to functions, but does not
anymore. Is this desired behavior ?
<?php
function foo($bar) { var_dump(debug_backtrace()); }
foo("bar");
?>
Output:
array(1) {
[0]=>
array(3) {
["file"]=>
string(36) "/home/magnus/Projects/base/test4.php"
["line"]=>
int(8)
["function"]=>
string(3) "foo"
}
}
The output from the example in the manual:
Hi: friend
array(2) {
[0]=>
array(4) {
["file"] => string(10) "/tmp/a.php"
["line"] => int(10)
["function"] => string(6) "a_test"
["args"]=>
array(1) {
[0] => &string(6) "friend"
}
}
[1]=>
array(4) {
["file"] => string(10) "/tmp/b.php"
["line"] => int(2)
["args"] =>
array(1) {
[0] => string(10) "/tmp/a.php"
}
["function"] => string(12) "include_once"
}
}
Was this changed for a reason ?
/Magnus
--
Feeling amorous, she looked under the sheets and cried, "Oh, no,
it's Microsoft!"