# debug_backtrace does not behave as documented

- Thread: https://externals.io/message/8998
- Original archive: https://news-web.php.net/php.internals/8998
- Started by magnus@php.net on 2004-04-08T11:31:02+00:00
- Messages: 5
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #8998 — magnus@php.net — 2004-04-08T11:31:02+00:00

URL: https://externals.io/message/8998#8998

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!"

---

## #9004 — Adam Maccabee Trachtenberg — 2004-04-08T15:43:40+00:00

URL: https://externals.io/message/8998#9004 · In reply to: #8998

> `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!

---

## #9007 — Andi Gutmans — 2004-04-08T17:14:36+00:00

URL: https://externals.io/message/8998#9007 · In reply to: #8998

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:
>
>
> > […]
>
>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!

---

## #9008 — Patrick Witte — 2004-04-08T17:23:38+00:00

URL: https://externals.io/message/8998#9008 · In reply to: #9007

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

---

## #9009 — magnus@php.net — 2004-04-08T17:32:43+00:00

URL: https://externals.io/message/8998#9009 · In reply to: #9007

> 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:
> > […]

-- 
One family builds a wall, two families enjoy it.
