PHPackages                             afeefa/debug-dump-log - 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. afeefa/debug-dump-log

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

afeefa/debug-dump-log
=====================

Simple console or logfile debugging

0.0.43(2mo ago)06.6k↓32.8%2MITPHPPHP &gt;=7.4

Since Feb 1Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/afeefacode/debug-dump-log)[ Packagist](https://packagist.org/packages/afeefa/debug-dump-log)[ RSS](/packages/afeefa-debug-dump-log/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (41)Used By (2)

afeefa/debug-dump-log
=====================

[](#afeefadebug-dump-log)

Dump one or more variables to the screen or into a log file.

Description
-----------

[](#description)

This is a convenience wrapper around PHP's `print_r()` function with the ability to:

- inspect multiple variables at once
- dump the output right into a log file
- provide calling context
- show less verbose output
- format output depending on the output channel (html, cli, log)

The package provides two global functions `debug_dump()` and `debug_log()` that can be called from elsewhere within a PHP project without explicit import. Yet, a log file must be configured in order to use `debug_log()`.

Example
-------

[](#example)

```
