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

333.8k↓47.9%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 1mo 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

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

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://www.gravatar.com/avatar/71266106071cb2021cd95755a704956b877d6f759ed8708d864ee20e41faf5bb?d=identicon)[tetreum](/maintainers/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

[symfony/stopwatch

Provides a way to profile code

2.8k387.2M918](/packages/symfony-stopwatch)[fruitcake/laravel-debugbar

PHP Debugbar integration for Laravel

19.1k662.9k29](/packages/fruitcake-laravel-debugbar)[jokkedk/webgrind

Webgrind is a Xdebug profiling web frontend in PHP5. It implements a subset of the features of kcachegrind and installs in seconds and works on all platforms. For quick'n'dirty optimizations it does the job.

3.3k193.0k](/packages/jokkedk-webgrind)[koriym/printo

An object graph visualizer.

1421.8M2](/packages/koriym-printo)[soloterm/dumps

A Laravel command to intercept dumps from your Laravel application.

125285.7k3](/packages/soloterm-dumps)[beyondcode/helo-laravel

HELO Laravel debug helper

90360.1k](/packages/beyondcode-helo-laravel)

PHPackages © 2026

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