PHPackages                             tetreum/perfect-print - 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. tetreum/perfect-print

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

tetreum/perfect-print
=====================

Perfect print function for PHP Debugging

334.9k↓87.8%PHP

Since Feb 4Pushed 5y ago1 watchersCompare

[ Source](https://github.com/tetreum/perfect-print)[ Packagist](https://packagist.org/packages/tetreum/perfect-print)[ RSS](/packages/tetreum-perfect-print/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

perfect-print
=============

[](#perfect-print)

Stop wasting your time using print\_r, var\_dump and echo functions to debug your code. Perfect print for PHP debugging is here.

#### Install

[](#install)

```
composer require tetreum/perfect-print "dev-master"

```

---

Example
=======

[](#example)

Having

```
$user = new stdClass();
$user->id = '';
$user->nick = 'luser';
$wrongJson = json_decode('ssdf');
```

> **Normal debug**

```
echo '';
print_r($user);
var_dump($wrongJson);
```

> **Perfect print**

```
p($user, $wrongJson);
```

Perfect print will automatically add and close `` tag for better view and also will make a separation space by using `` or `\n` if you are in cli.

¡Test it yourself!

```
p($obj, 56, false, null, 'sdsf');
```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1708730?v=4)[tetreum](/maintainers/tetreum)[@tetreum](https://github.com/tetreum)

---

Top Contributors

[![tetreum](https://avatars.githubusercontent.com/u/1708730?v=4)](https://github.com/tetreum "tetreum (10 commits)")

---

Tags

debugging-toolphp

### Embed Badge

![Health badge](/badges/tetreum-perfect-print/health.svg)

```
[![Health](https://phpackages.com/badges/tetreum-perfect-print/health.svg)](https://phpackages.com/packages/tetreum-perfect-print)
```

###  Alternatives

[spatie/craft-ray

Easily debug CraftCMS projects

1638.6k](/packages/spatie-craft-ray)

PHPackages © 2026

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