# Optional parameter for debug_print_backtrace()

- Thread: https://externals.io/message/8588
- Original archive: https://news-web.php.net/php.internals/8588
- Started by Andrey Hristov on 2004-03-18T22:56:24+00:00
- Messages: 2
- 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

---

## #8588 — Andrey Hristov — 2004-03-18T22:56:24+00:00

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

Hi internals,
what do you think about adding an optional parameter to `debug_print_backtrace()` (PHP 5 
only) so instead of printing the stacktrace to get it as string. The information provided 
by `debug_print_backtrace()` is more than the information provided by `debug_backtrace()`.
So if the parameter is added the function will behave just like `print_r()` which has second 
  optional parameter.
I have made a patch which is available here : 
http://hristov.com/andrey/projects/php_stuff/patches/debug_print_backtrace_as_string.diff.txt


Andrey

---

## #8590 — Andi Gutmans — 2004-03-19T01:30:02+00:00

URL: https://externals.io/message/8588#8590 · In reply to: #8588

What else does `debug_print_backtrace()` include? If the info is more maybe 
we should change `debug_backtrace()`?
In any case, in general I don't have a problem to do this. Might be nicer 
if we could do it without output buffering though but I haven't looked at 
the code to see how hard that would be.

Andi

At 11:56 PM 3/18/2004 +0100, Andrey Hristov wrote:
>  Hi internals,
>what do you think about adding an optional parameter to 
>debug_print_backtrace() (PHP 5 only) so instead of printing the stacktrace 
>to get it as string. The information provided by `debug_print_backtrace()` 
>is more than the information provided by `debug_backtrace()`.
>So if the parameter is added the function will behave just like `print_r()` 
>which has second  optional parameter.
>I have made a patch which is available here : 
>http://hristov.com/andrey/projects/php_stuff/patches/debug_print_backtrace_as_string.diff.txt
>
>
>Andrey
