PHPackages                             paste/pre - 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. paste/pre

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

paste/pre
=========

A handsome replacement for print\_r &amp; var\_dump. Debugging output with understated style.

202.2k3PHP

Since Jun 12Pushed 12y ago1 watchersCompare

[ Source](https://github.com/paste/Pre.php)[ Packagist](https://packagist.org/packages/paste/pre)[ RSS](/packages/paste-pre/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Pre
---

[](#pre)

A handsome replacement for print\_r &amp; var\_dump. Output debugging info in a minimally styled `` block.

```
// basic usage
echo Pre::r($data);
```

[![Basic Example](https://github.com/paste/Pre.php/raw/master/examples/basic_example.png)](https://github.com/paste/Pre.php/raw/master/examples/basic_example.png)

```
// add data to storage queue with label
Pre::add($data, 'My Debug Data');

// configure dimensions
Pre::$config['width'] = 400;
Pre::$config['height'] = 80;

// render and clear queue
echo Pre::render();
```

[![Label Example](https://github.com/paste/Pre.php/raw/master/examples/label_example.png)](https://github.com/paste/Pre.php/raw/master/examples/label_example.png)

Installation
------------

[](#installation)

[Use Composer](http://getcomposer.org/). Add `paste/pre` to your project's `composer.json`:

```
{
    "require": {
        "paste/pre": "dev-master"
    }
}
```

Or just include Pre.php directly into your project. You might also want to setup the Pre() function shortcut for convenience:

```
