PHP Classes

PHP Dumper Var: Display a formatted version of variable values

Recommend this page to a friend!
  Info   View files Documentation   View files View files (8)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 99 This week: 1All time: 9,797 This week: 560Up
Version License PHP version Categories
php-dumper 1.0Free for non-comm...5PHP 5, Debug, Language
Description 

Author

This class can display a formatted version of variable values.

It can take the values of one or more variables and generates a string that displays the variable values in a readable format.

Arrays and objects can be traversed recursively to display its member values.

The class can either return a string with the formatted variable values, display it to the current page or even exit the current script.

Picture of Marco Cesarato
  Performance   Level  
Name: Marco Cesarato is available for providing paid consulting. Contact Marco Cesarato .
Classes: 9 packages by
Country: Italy Italy
Age: 28
All time rank: 133654 in Italy Italy
Week rank: 416 Up16 in Italy Italy Up
Innovation award
Innovation award
Nominee: 2x

Documentation

PHP Dumper

Build Status

Version: 1.0.0.8

Github: https://github.com/marcocesarato/PHP-Dumper

Author: Marco Cesarato

Description

This class can display a formatted version of variable values.

It can take the values of one or more variables and generates a string that displays the variable values in a readable format.

Arrays and objects can be traversed recursively to display its member values.

The class can either return a string with the formatted variable values, display it to the current page or even exit the current script.

Requirements

  • php 5.6+

Install

Composer

  1. Install composer
  2. Type `composer require marcocesarato/dumper`
  3. Enjoy

Usage

use marcocesarato\dumper\Dumper;

$arr = [1,2,3,4,5];

$dump = Dumper::get($arr, $arr /, .../); // Get string of dump
Dumper::out($arr /, .../); // Print
Dumper::fatal($arr /, .../); // Print and die

Methods

Dumper

| Method | Parameters | Description | | ----------- | ----------------------------------- | -------------------------------------------------- | | get | mixed $expression [, mixed $... ]<br>return string | Return dump as string | | out | mixed $expression [, mixed $... ]<br>return void | Print dump | | clean | mixed $expression [, mixed $... ]<br>return void | Clean stream (ob_clean) and print dump | | json | mixed $expression [, mixed $... ]<br>return void | Clean stream (ob_clean) and print json dump | | fatal | mixed $expression [, mixed $... ]<br>return void | Print dump and die | | enableHighlight | return void | Enable Highlight (default true) | | disableHighlight | return void | Disable Highlight | | disableHighlight | return void | Disable Highlight | | getDepth | return int | Get Object/Array dump depth | | setDepth | int $depth<br>return void | Set Object/Array dump depth |


  Files folder image Files  
File Role Description
Files folder imagesrc (1 file)
Accessible without login Plain text file .cs.php Example Example script
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file autoload.php Aux. Auxiliary script
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
  Plain text file Dumper.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:99
This week:1
All time:9,797
This week:560Up