Skip to content

howion/DumpLib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PHP DumpLib

Installation

From Packagist

$ composer require howion/dumplib

Usage

new DumpLib(Theme $theme = HowionBlack)
->dump(...$values)
->dd(...$values) # DUMP N DIE
->deliver($die = false)
<?php
use DumpLib\Themes\HowionBlack\HowionBlack;
use DumpLib\DumpLib;

$d = new DumpLib(new HowionBlack([
     #---------------------
     #  DEFAULT SETTINGS
     #---------------------
    'title'  => 'DumpLib',
    'zoom'   => 1
]));

// DUMP GIVEN VARIABLES
$d->dump($variable, $variable, ...)
$d->dump($variable)

// ECHOES THE GENERATED HTML AND OVERWRITES TO THE CURRENT BUFFER
// YOU CAN WRITE THIS TO THE VERY END OF YOUR PHP SCRIPT
// DOES NOTHING IF THERE IS NOTHING TO DUMP
$d->deliver($die = false)

Preinstalled Themes

  • HowionBlack DumpLib\Themes\HowionBlack\HowionBlack

I Didn't Love These Themes

Write your own theme then just extend DumpLib\Themes\Theme class. You can also use utils.

Screenshots

<?php

$d->dump(M_E); # EULERS NUMBER
$d->dump(7823);
$d->dump(true);
$d->dump('Hell0 W0rld.');
$d->dump([
    'user.username' => 'howion',
    'user.details'  => [
        'detail.adress' => 'Nowhere',
        'detail.phone'  => '+00 000 000 0000'
    ],
]);
$d->deliver();

Screenshot

License

MIT