debug_backtrace does not behave as documented

php.internals

Magnus Maatta

22 years ago
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!"

Adam Maccabee Trachtenberg

22 years ago
On Thu, 8 Apr 2004, Magnus [iso-8859-15] Määttä wrote:
> debug_backtrace() used to print out arguments to functions, but does not > anymore. Is this desired behavior ?
I discovered this least night and it is already filed as a bug: http://bugs.php.net/bug.php?id=27397 I'm hoping it's a bug, not a feature. :) -adam
-- adam@trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today!

Andi Gutmans

22 years ago
Was this broken by my latest fix/patch or did it break before that? (I commited something yesterday). At 11:43 AM 4/8/2004 -0400, Adam Maccabee Trachtenberg wrote:

Patrick Witte

22 years ago
Andi Gutmans wrote:
> Was this broken by my latest fix/patch or did it break before that? (I > commited something yesterday). >
This is broken at least since beta 2 or 3, I don't remember when I first noticed. Patrick
-- use the source, luke

Magnus Maatta

22 years ago
On Thursday 08 April 2004 19.14, Andi Gutmans wrote:
> Was this broken by my latest fix/patch or did it break before that? (I > commited something yesterday).
It was broken before. To be honest.. I have no idea when it worked as it should last time. I noticed it a few days ago (3 or 4 maybe).
> At 11:43 AM 4/8/2004 -0400, Adam Maccabee Trachtenberg wrote: > >On Thu, 8 Apr 2004, Magnus [iso-8859-15] Määttä wrote: > > > debug_backtrace() used to print out arguments to functions, but does > > > not anymore. Is this desired behavior ? > > > >I discovered this least night and it is already filed as a bug: > > > >http://bugs.php.net/bug.php?id=27397 > > > >I'm hoping it's a bug, not a feature. :)
-- One family builds a wall, two families enjoy it.

Andi Gutmans

22 years ago
I was originally opposed to adding this because I knew it could cause problems. I haven't followed the arguments patch too closely except for trying to fix crashes as well as I can. I can try and look into it. Andi At 07:32 PM 4/8/2004 +0200, Magnus Määttä wrote: