PHPackages                             jackdtaylor/dpr - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. jackdtaylor/dpr

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

jackdtaylor/dpr
===============

die(print\_r()) helper functions

1.1.7(2y ago)157[2 issues](https://github.com/JackDTaylor/dpr/issues)WTFPLPHPPHP &gt;=7.2

Since Aug 25Pushed 1y ago1 watchersCompare

[ Source](https://github.com/JackDTaylor/dpr)[ Packagist](https://packagist.org/packages/jackdtaylor/dpr)[ Docs](https://github.com/JackDTaylor/dpr)[ RSS](/packages/jackdtaylor-dpr/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (13)Used By (0)

Dpr
===

[](#dpr)

Set of utility/debugging PHP functions.

Documentation
-------------

[](#documentation)

### Constants

[](#constants)

#### `DPR_DEVELOPER_IPS`

[](#dpr_developer_ips)

`define('DPR_DEVELOPER_IPS', '127.0.0.1, 192.168.0.1')`
List of comma-separated IPs or false to disable this check. Spaces are trimmed. Declares IP addresses allowed to see the debug info. For users not matching this filter `dpr()` will simply return first passed argument and do nothing.

#### `DPR_SHOW_MEMINFO`

[](#dpr_show_meminfo)

`define('DPR_SHOW_MEMINFO', true)`
Whether show memory info or not

#### `DPR_ENCODING`

[](#dpr_encoding)

`define('DPR_ENCODING', 'utf-8')`
Default encoding to send with `header('Content-Type: text/plain; charset=')`;

#### `$_SERVER['REQUEST_TIME_FLOAT']`

[](#_serverrequest_time_float)

`$_SERVER['REQUEST_TIME_FLOAT'] = microtime(true);`
Optionally you can put this line to the very start of your execution flow to measure request execution time.
If not present, `dpr()` will set it up as the time of `include 'dpr.php';`.

### Functions

[](#functions)

#### `is_developer()`

[](#is_developer)

`is_developer(); // Returns boolean`
Returns `true` if `$_SERVER['REMOTE_ADDR']` is in [`DPR_DEVELOPER_IPS`](#dpr_developer_ips) constant.

#### `dpr`

[](#dpr-1)

`dpr($var : any, ...);`
Basic functionality. Prints variables provided as arguments and stops the script execution.

#### `dprv`

[](#dprv)

`dprv($var : any, ...); // -v for "var_dump"`
Same as [`dpr()`](#dpr), but uses `var_dump()` instead of `print_r()`

#### `dprt`

[](#dprt)

`dprt(); //  -t for "trace"`
Prints backtrace and stops the script execution.

#### `dprb`

[](#dprb)

`dprb(); // -b for "breakpoint"`
Defines a breakpoint for [dprd()](#dprd) function.

#### `dprd`

[](#dprd)

`dprd($var : any, ...); // -d for something like "debug" or whatever`
Triggers [dpr()](#dpr) only if breakpoint was defined with [dprb()](#dprb)

#### `dprm`

[](#dprm)

`dprm($var : any, ...); // -m for "measure"`
Prints all measures made with [dprmFrom()](#dprmFrom)/[dprmTo()](#dprmTo) and then executes [dpr()](#dpr) for passed arguments.

#### `dprmFrom`

[](#dprmfrom)

`dprmFrom($key : string);`
Starts execution time measure named as `$key`.

#### `dprmTo`

[](#dprmto)

`dprmTo($key : string);`
Ends execution time measure named as `$key`.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance9

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Every ~125 days

Recently: every ~293 days

Total

12

Last Release

757d ago

PHP version history (2 changes)1.0PHP &gt;=5.2.0

1.1.5PHP &gt;=7.2

### Community

Maintainers

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

---

Top Contributors

[![JackDTaylor](https://avatars.githubusercontent.com/u/6381017?v=4)](https://github.com/JackDTaylor "JackDTaylor (43 commits)")

---

Tags

logdebugprint\_rvar\_dump

### Embed Badge

![Health badge](/badges/jackdtaylor-dpr/health.svg)

```
[![Health](https://phpackages.com/badges/jackdtaylor-dpr/health.svg)](https://phpackages.com/packages/jackdtaylor-dpr)
```

###  Alternatives

[analog/analog

Fast, flexible, easy PSR-3-compatible PHP logging package with dozens of handlers.

3511.6M24](/packages/analog-analog)[inpsyde/wonolog

Monolog-based logging package for WordPress.

184631.3k7](/packages/inpsyde-wonolog)[baibaratsky/yii2-rollbar

Rollbar for Yii2

35131.9k](/packages/baibaratsky-yii2-rollbar)[bdk/debug

Browser/javascript like console class for PHP

809.1k1](/packages/bdk-debug)[snapshotpl/zf-snap-php-debug-bar

PHP Debug Bar module for Zend Framework 2

3026.1k](/packages/snapshotpl-zf-snap-php-debug-bar)

PHPackages © 2026

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