PHPackages                             steevanb/php-backtrace - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. steevanb/php-backtrace

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

steevanb/php-backtrace
======================

Nice debug\_backtrace() dump, with call and code preview

2.1.0(5y ago)22142.6k↑20.5%35MITPHPPHP ^5.4|^7.0|^8.0CI failing

Since Aug 2Pushed 5y ago1 watchersCompare

[ Source](https://github.com/steevanb/php-backtrace)[ Packagist](https://packagist.org/packages/steevanb/php-backtrace)[ RSS](/packages/steevanb-php-backtrace/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (8)Used By (5)

[![version](https://camo.githubusercontent.com/0b7a9f9296fd55bc55fec322fc7ff63bc42b0ad4a96cffb62a85b39a3be44bac/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d322e312e302d677265656e2e737667)](https://github.com/steevanb/php-backtrace/tree/2.1.0)[![php](https://camo.githubusercontent.com/bdf58564b8479209e7f9d61249e5c5471d0a7a73d10ba784a45325ec3a77dc2b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545352e34253230253743253743253230253545372e30253230253743253743253230253545382e302d626c75652e737667)](http://php.net)[![Lines](https://camo.githubusercontent.com/5f93ecb77817526ac4955ff25ccd48c9c329a9f536d7fee3c5b457c49916290b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f64652532306c696e65732d313537352d677265656e2e737667)](https://camo.githubusercontent.com/5f93ecb77817526ac4955ff25ccd48c9c329a9f536d7fee3c5b457c49916290b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f64652532306c696e65732d313537352d677265656e2e737667)[![Total Downloads](https://camo.githubusercontent.com/e821daa10a54aa5659ffcf8c361a9b07d987aa9b073efe26700f2763f5f13ec9/68747470733a2f2f706f7365722e707567782e6f72672f7374656576616e622f7068702d6261636b74726163652f646f776e6c6f616473)](https://camo.githubusercontent.com/e821daa10a54aa5659ffcf8c361a9b07d987aa9b073efe26700f2763f5f13ec9/68747470733a2f2f706f7365722e707567782e6f72672f7374656576616e622f7068702d6261636b74726163652f646f776e6c6f616473)[![Scrutinizer](https://camo.githubusercontent.com/d1d6e350888ea505c982667f02dd8b45db22379480ff7147658649c03dce48cc/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7374656576616e622f7068702d6261636b74726163652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/steevanb/php-backtrace/)

php-backtrace
-------------

[](#php-backtrace)

Show nice equivalent to `debug_backtrace()`, with caller, code preview etc.

Can be used in HTML, or with [symfony/console](https://github.com/symfony/console).

[Changelog](changelog.md)

Installation
------------

[](#installation)

```
composer require --dev steevanb/php-backtrace ^2.1
```

Configuration
-------------

[](#configuration)

```
// configure how file paths will be shown
// true : remove path prefix, based on DumpBacktrace.php path (assume it is in vendor/ dir)
// false : do not remove anything in file paths
// string : remove this prefix
\DumpBacktrace::setRemovePathPrefix($remove);
```

Dump as HTML
------------

[](#dump-as-html)

```
// get backtrace dump as array
\DebugBacktraceHtml::getBacktraces();
// get backtrace dump as HTML
\DebugBacktraceHtml::getDump();
// write getDump() HTML with echo
\DebugBacktraceHtml::dump();
// write getDump() HTML with echo, and exit
\DebugBacktraceHtml::eDump();
```

[![HTML backtrace](resources/backtrace_html.png)](resources/backtrace_html.png)

Dump in symfony/console application
-----------------------------------

[](#dump-in-symfonyconsole-application)

```
// Write dump
\DebugBacktraceConsole::dump();
// Write dump and exit
\DebugBacktraceConsole::eDump();
```

[![Console backtrace](resources/backtrace_console.jpg)](resources/backtrace_console.jpg)

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community15

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~291 days

Recently: every ~419 days

Total

7

Last Release

1828d ago

Major Versions

1.1.1 → 2.0.02017-01-31

PHP version history (2 changes)1.0.0PHP ^5.4|^7.0

2.1.0PHP ^5.4|^7.0|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/e59638521a0ca6412cd2fa506834e384d4bac92197159891d4ccfe8e4b3d61eb?d=identicon)[steevanb](/maintainers/steevanb)

---

Top Contributors

[![steevanb](https://avatars.githubusercontent.com/u/5063383?v=4)](https://github.com/steevanb "steevanb (19 commits)")

---

Tags

phpsymfony-console

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/steevanb-php-backtrace/health.svg)

```
[![Health](https://phpackages.com/badges/steevanb-php-backtrace/health.svg)](https://phpackages.com/packages/steevanb-php-backtrace)
```

###  Alternatives

[symfony/stopwatch

Provides a way to profile code

2.8k387.2M918](/packages/symfony-stopwatch)[fruitcake/laravel-debugbar

PHP Debugbar integration for Laravel

19.1k662.9k29](/packages/fruitcake-laravel-debugbar)[spatie/ignition

A beautiful error page for PHP applications.

510147.6M69](/packages/spatie-ignition)[jokkedk/webgrind

Webgrind is a Xdebug profiling web frontend in PHP5. It implements a subset of the features of kcachegrind and installs in seconds and works on all platforms. For quick'n'dirty optimizations it does the job.

3.3k193.0k](/packages/jokkedk-webgrind)[koriym/printo

An object graph visualizer.

1421.8M2](/packages/koriym-printo)[soloterm/dumps

A Laravel command to intercept dumps from your Laravel application.

125285.7k3](/packages/soloterm-dumps)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
