php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #43792 Add a depth parameter to debug_backtrace.
Submitted: 2008-01-09 03:31 UTC Modified: 2012-03-01 17:37 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: darrel dot opry at gmail dot com Assigned: nikic (profile)
Status: Closed Package: *General Issues
PHP Version: 5.2.5 OS: ALL
Private report: No CVE-ID: None
 [2008-01-09 03:31 UTC] darrel dot opry at gmail dot com
Description:
------------
It would be nice to be able to specify the depth of a debug_backtrace. So I can call debug_backtrace(1) and get only the current functions caller function in the backtrace.  

It would be even cooler(for me at least) to have depth and start params. Then I could call debug_backtrace(3,5) and get the 5th, 6th, and 7th function up the call stack.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-01 17:37 UTC] nikic@php.net
This will be available in PHP 5.4. See docs at http://de3.php.net/manual/en/function.debug-backtrace.php :)
 [2012-03-01 17:37 UTC] nikic@php.net
-Status: Open +Status: Closed -Package: Feature/Change Request +Package: *General Issues -Assigned To: +Assigned To: nikic
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 16:01:38 2025 UTC