PHPackages                             webxid/debug-helpers - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. webxid/debug-helpers

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

webxid/debug-helpers
====================

v1.0.0(4y ago)081MITPHPPHP &gt;=7.1

Since Apr 6Pushed 4y ago1 watchersCompare

[ Source](https://github.com/webxid/debug-helpers)[ Packagist](https://packagist.org/packages/webxid/debug-helpers)[ RSS](/packages/webxid-debug-helpers/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (1)

Description
===========

[](#description)

The lib contains the tools for debug. It doesn't have any external dependencies to other libs or frameworks, so it could be used in any project.

It's helpful for me. Hope, it'll be helpful for someone else

Install
=======

[](#install)

Run `composer require webxid/debug-helpers`

How To Use
==========

[](#how-to-use)

Simple data dump
----------------

[](#simple-data-dump)

```
use function WebXID\DebugHelpers\_dump;
use function WebXID\DebugHelpers\__dump;

_dump($data); // To print data dump into a browser
__dump($data); // To print data dump into a command line
```

Dump a Backtrace
----------------

[](#dump-a-backtrace)

```
use function WebXID\DebugHelpers\_backtrace;

_backtrace(); // print a Back trace from a script start file to the currecn place
```

Get Execution time
------------------

[](#get-execution-time)

```
use function WebXID\DebugHelpers\_trackTime;

_trackTime('track_magic_time'); // start track of `track_magic_time`

// Do a magic

echo _trackTime('track_magic_time'); // print a `track_magic_time` execution time

echo _trackTime(true); // print the all registered time track keys data
```

Cache a var data
----------------

[](#cache-a-var-data)

```
use function WebXID\DebugHelpers\_cachedLog;

$var = 1;
_cachedLog('$var', $var);

$var = 2;
_cachedLog('$var', $var);

$var = 3;
_cachedLog('$var', $var);

// print cached data of the key `$var`
print_r(_cachedLog('$var'));
/**
 * will prints the array
 * [
 *      '$var' => [
 *          1,
 *          2,
 *          3,
 *      ],
 * ]
 */

 print_r(_cachedLog()); // prints all cached data
```

Dump data into log file
-----------------------

[](#dump-data-into-log-file)

To dump a data into a log file use the next functions

```
use WebXID\DebugHelpers\Environment;
use function WebXID\DebugHelpers\_log;
use function WebXID\DebugHelpers\_logWithClean;
use function WebXID\DebugHelpers\_logAndDie;
use function WebXID\DebugHelpers\_logWithCleanAndDie;

Environment::setRootDir(__DIR__);

_log($data); // Adds Dump of the $data var to the end of log file and continue a script procssing
_logWithClean($data); // Cleaned up the log file, Dumps the $data var and continue a script procssing
_logAndDie($data); // Adds Dump of the $data var to the end of log file and break a script processing
_logWithCleanAndDie($data); // Cleaned up the log file, Adds Dump of the $data var to the end of log file and break a script processing
```

The log file route: `Environment::getRootDir() . '/logs/webxid.log'`.

> !!! Note !!!
>
> The dir `logs` has to be readable and writable for the script. Otherwise you will get a permission error.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

1549d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3855639?v=4)[Pavlo M.](/maintainers/webxid)[@webxid](https://github.com/webxid)

---

Top Contributors

[![webxid](https://avatars.githubusercontent.com/u/3855639?v=4)](https://github.com/webxid "webxid (1 commits)")

### Embed Badge

![Health badge](/badges/webxid-debug-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/webxid-debug-helpers/health.svg)](https://phpackages.com/packages/webxid-debug-helpers)
```

###  Alternatives

[carbon/includeassets

Include your assets (css, js) in an easy way into Neos

14235.7k15](/packages/carbon-includeassets)[components/modernizr

Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user's browser.

10256.1k8](/packages/components-modernizr)[rogervila/provably-fair

PHP implementation of Bustabit's Provably Fair system

1412.9k](/packages/rogervila-provably-fair)[eclipxe/sepomexphp

Servicio Postal Mexicano PHP Library (Unofficial)

101.1k](/packages/eclipxe-sepomexphp)

PHPackages © 2026

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