2017 © Pedro Peláez
 

library dump5

A pretty version of php var_dump. This class displays structured information about one or more expressions that includes its type and value.

image

ghostff/dump5

A pretty version of php var_dump. This class displays structured information about one or more expressions that includes its type and value.

  • Saturday, February 3, 2018
  • by Ghostff
  • Repository
  • 2 Watchers
  • 14 Stars
  • 53 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 4 Versions
  • 2 % Grown

The README.md

Pretty Data Dump

A pretty version of php var_dump. This class displays structured information about one or more expressions that includes its type and value., (*1)

Check out Dump7 for PHP 7+, (*2)

Installation

You can download the Latest release version as a standalone, alternatively you can use Composer, (*3)

composer require ghostff/dump5

```json "require": { "ghostff/dump5": "^1.0" }, (*4)

# Display Flags
You can simple hide or show some object attribute using a Doc block flag:

|                               |                                                   |
|-------------------------------|---------------------------------------------------|
| `@dumpignore-inheritance`     | Hides inherited class properties.                 |
| `@dumpignore-inherited-class` | Hides the class name from inherited properties.   |
| `@dumpignore-private`         | Show all properties except the **private** ones.  |
| `@dumpignore-protected`       | Show all properties except the **protected** ones.|
| `@dumpignore-public`          | Show all properties except the **public** ones.   |
| `@dumpignore`                 | Hide the property the Doc comment belongs to.     |
```php
/**
* @dumpignore-inheritance
* @dumpignore-inherited-class
* @dumpignore-private
* @dumpignore-public
* @dumpignore-public
*/
Class Foo extends Bar {
    /** @dumpignore */
    public $big_object = null;
}

Usage

class FooBar
{
    private $inherited_int   = 123;
    private $inherited_array = array('string');
}

class Bar extends FooBar
{
    private $inherited_float = 0.22;
    private $inherited_bool  = true;
}

class Foo extends Bar
{
    private $string = 'string';
    protected $int  = 10;
    public $array   = array(
        'foo'   => 'bar'
    );
    protected static $bool = false;
}

$string   = 'Foobar';
$array    = array('foo', 'bar');
$int      = 327626;
$double   = 22.223;
$null     = null;
$bool     = true;
$resource = fopen('LICENSE', 'r');
$m        = microtime(true);

new Dump(new Foo, $string, $array, $int, $double, $null, $bool, array(
    'foo' => 'bar',
    'bar' => 'foo',
    array(
        'foo' => 'foobar',
        'bar_foo',
        2 => 'foo',
        'foo' => array(
            'barbar' => 55,
            'foofoo' => false,
            'foobar' => null,

        )
    )
), $resource);

new Dump(1 == '1', 1 === '1');

Replacing predefined colors:, (*5)

# set($name, [$cgi_color, $cli_color]);
Dump::set('boolean', array('bb02ff', 'purple'));

CGI output:, (*6)

cgi screenshot, (*7)

CLI Posix output:, (*8)

cli screenshot, (*9)

Windows user who are using command line tools like cmder can use the Dump::d method:, (*10)

Dump::d(new Foo, $string, $array, $int, $double, $null, $bool, array(
    'foo' => 'bar',
    'bar' => 'foo',
    array(
        'foo' => 'foobar',
        'bar_foo',
        2 => 'foo',
        'foo' => array(
            'barbar' => 55,
            'foofoo' => false,
            'foobar' => null,
        )
    )
));

CLI Windows output:, (*11)

cli screenshot, (*12)

The Versions

03/02 2018

dev-master

9999999-dev

A pretty version of php var_dump. This class displays structured information about one or more expressions that includes its type and value.

  Sources   Download

BSD BSD-3-Clause

The Requires

  • php >=5.3

 

by Chrys Ugwu

var_dump debuger data_dump

03/02 2018

v1.0.01-beta

1.0.01.0-beta

A pretty version of php var_dump. This class displays structured information about one or more expressions that includes its type and value.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3

 

by Chrys Ugwu

var_dump debuger data_dump

02/01 2018

dev-HTML_Esc

dev-HTML_Esc

A pretty version of php var_dump. This class displays structured information about one or more expressions that includes its type and value.

  Sources   Download

BSD

The Requires

  • php >=5.3

 

by Chrys Ugwu

var_dump debuger data_dump

10/10 2017

v1.0.0

1.0.0.0

A pretty version of php var_dump. This class displays structured information about one or more expressions that includes its type and value.

  Sources   Download

BSD

The Requires

  • php >=5.3

 

by Chrys Ugwu

var_dump debuger data_dump