Skip to content

steevanb/php-backtrace

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
bin
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 

version php Lines Total Downloads Scrutinizer

php-backtrace

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

Can be used in HTML, or with symfony/console.

Changelog

Installation

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

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

// 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

Dump in symfony/console application

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

Console backtrace

About

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

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published