2017 © Pedro Peláez
 

library exporter

Provides the functionality to export PHP variables for visualization

image

sebastian/exporter

Provides the functionality to export PHP variables for visualization

  • Thursday, June 28, 2018
  • by Sebastian
  • Repository
  • 7 Watchers
  • 3187 Stars
  • 78,713,246 Installations
  • PHP
  • 57 Dependents
  • 0 Suggesters
  • 13 Forks
  • 2 Open issues
  • 14 Versions
  • 8 % Grown

The README.md

Latest Stable Version CI Status codecov, (*1)

sebastian/exporter

This component provides the functionality to export PHP variables for visualization., (*2)

Installation

You can add this library as a local, per-project dependency to your project using Composer:, (*3)

composer require sebastian/exporter

If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:, (*4)

composer require --dev sebastian/exporter

Usage

Exporting:, (*5)

<?php
use SebastianBergmann\Exporter\Exporter;

$exporter = new Exporter;

/*
Exception Object &0000000078de0f0d000000002003a261 (
    'message' => ''
    'string' => ''
    'code' => 0
    'file' => '/home/sebastianbergmann/test.php'
    'line' => 34
    'previous' => null
)
*/

print $exporter->export(new Exception);

Data Types

Exporting simple types:, (*6)

<?php
use SebastianBergmann\Exporter\Exporter;

$exporter = new Exporter;

// 46
print $exporter->export(46);

// 4.0
print $exporter->export(4.0);

// 'hello, world!'
print $exporter->export('hello, world!');

// false
print $exporter->export(false);

// NAN
print $exporter->export(acos(8));

// -INF
print $exporter->export(log(0));

// null
print $exporter->export(null);

// resource(13) of type (stream)
print $exporter->export(fopen('php://stderr', 'w'));

// Binary String: 0x000102030405
print $exporter->export(chr(0) . chr(1) . chr(2) . chr(3) . chr(4) . chr(5));

Exporting complex types:, (*7)

<?php
use SebastianBergmann\Exporter\Exporter;

$exporter = new Exporter;

/*
Array &0 (
    0 => Array &1 (
        0 => 1
        1 => 2
        2 => 3
    )
    1 => Array &2 (
        0 => ''
        1 => 0
        2 => false
    )
)
*/

print $exporter->export(array(array(1,2,3), array("",0,FALSE)));

/*
Array &0 (
    'self' => Array &1 (
        'self' => Array &1
    )
)
*/

$array = array();
$array['self'] = &$array;
print $exporter->export($array);

/*
stdClass Object &0000000003a66dcc0000000025e723e2 (
    'self' => stdClass Object &0000000003a66dcc0000000025e723e2
)
*/

$obj = new stdClass();
$obj->self = $obj;
print $exporter->export($obj);

Compact exports:, (*8)

<?php
use SebastianBergmann\Exporter\Exporter;

$exporter = new Exporter;

// Array ()
print $exporter->shortenedExport(array());

// Array (...)
print $exporter->shortenedExport(array(1,2,3,4,5));

// stdClass Object ()
print $exporter->shortenedExport(new stdClass);

// Exception Object (...)
print $exporter->shortenedExport(new Exception);

// this\nis\na\nsuper\nlong\nstring\nt...\nspace
print $exporter->shortenedExport(
<<<LONG_STRING
this
is
a
super
long
string
that
wraps
a
lot
and
eats
up
a
lot
of
space
LONG_STRING
);

The Versions

28/06 2018

dev-master

9999999-dev http://www.github.com/sebastianbergmann/exporter

Provides the functionality to export PHP variables for visualization

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Bernhard Schussek
by Volker Dusch

export exporter

03/04 2017

3.1.0

3.1.0.0 http://www.github.com/sebastianbergmann/exporter

Provides the functionality to export PHP variables for visualization

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Bernhard Schussek
by Volker Dusch

export exporter

07/03 2017

2.0.x-dev

2.0.9999999.9999999-dev http://www.github.com/sebastianbergmann/exporter

Provides the functionality to export PHP variables for visualization

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Bernhard Schussek
by Volker Dusch

export exporter

03/03 2017

3.0.0

3.0.0.0 http://www.github.com/sebastianbergmann/exporter

Provides the functionality to export PHP variables for visualization

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Bernhard Schussek
by Volker Dusch

export exporter

26/02 2017

1.2.x-dev

1.2.9999999.9999999-dev http://www.github.com/sebastianbergmann/exporter

Provides the functionality to export PHP variables for visualization

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Bernhard Schussek
by Volker Dusch

export exporter

19/11 2016

2.0.0

2.0.0.0 http://www.github.com/sebastianbergmann/exporter

Provides the functionality to export PHP variables for visualization

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Bernhard Schussek
by Volker Dusch

export exporter

17/06 2016

1.2.2

1.2.2.0 http://www.github.com/sebastianbergmann/exporter

Provides the functionality to export PHP variables for visualization

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Bernhard Schussek
by Volker Dusch

export exporter

21/06 2015

1.2.1

1.2.1.0 http://www.github.com/sebastianbergmann/exporter

Provides the functionality to export PHP variables for visualization

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Bernhard Schussek
by Volker Dusch

export exporter

27/01 2015

1.2.0

1.2.0.0 http://www.github.com/sebastianbergmann/exporter

Provides the functionality to export PHP variables for visualization

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Bernhard Schussek
by Volker Dusch

export exporter

24/01 2015

1.1.0

1.1.0.0 http://www.github.com/sebastianbergmann/exporter

Provides the functionality to export PHP variables for visualization

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Bernhard Schussek
by Volker Dusch

export exporter

19/01 2015

dev-factory

dev-factory http://www.github.com/sebastianbergmann/exporter

Provides the functionality to export PHP variables for visualization

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.3

 

The Development Requires

by Bernhard Schussek
by Volker Dusch

export exporter

10/09 2014

1.0.2

1.0.2.0 http://www.github.com/sebastianbergmann/exporter

Provides the functionality to export PHP variables for visualization

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.3

 

The Development Requires

by Bernhard Schussek
by Volker Dusch

export exporter

16/02 2014

1.0.1

1.0.1.0 http://www.github.com/sebastianbergmann/exporter

Provides the functionality to export PHP variables for visualization

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.3

 

The Development Requires

by Bernhard Schussek
by Volker Dusch

export exporter

09/07 2013

1.0.0

1.0.0.0 http://www.github.com/sebastianbergmann/exporter

Provides the functionality to export PHP variables for visualization

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.3

 

by Bernhard Schussek
by Volker Dusch

export exporter