Download the PHP package leeoniya/dump-r without Composer

On this page you can find all versions of the php package leeoniya/dump-r. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package dump-r

dump_r()

a cleaner, leaner mix of print_r() and var_dump() (MIT Licensed)

screenshot

Demo: http://o-0.me/dump_r/

Installing

Composer

https://packagist.org/packages/leeoniya/dump-r

Require

Using & Config

Use dump_r() as a drop-in replacement for print_r() and var_dump(). It has some additional arguments that control output. The full signature of the function is:

There are also two modifier keys that can be used to control how the node expanding/collapsing works:

  1. Holding Shift while toggling will expand/collapse the full depth of the node.
  2. Hold Ctrl while toggling will expand/collapse all siblings after that node also. This is useful if you have an array of objects/arrays and want to expand all of them to one level simultaneously by clicking just the first one in the group. It works well for deep, complex objects.
  3. Shift and Ctrl can be used together.

Double-clicking binary strings will toggle them between mixed hex/ascii and hex-only representations:

binary_toggle

Some types of strings can be pretty-printed and additonal rendering options can be tweaked (shown with defaults):

Circular reference (recursion) detection and duplicate output is indicated like this for arrays, objects, closures and resources respectively: [*],{*},(*),<*>.

You can re-style all aspects of the html output using CSS, everything is class-tagged.

Extending

Adding your own classifiers & parsers is extremely easy. Here are instructions and two concrete examples of how the String base type can be subtyped. First for displaying EXIF data of jpeg and tiff image paths and then showing row data from CSV file paths.

This array

Which would normally dump like this:

coretyped

Can be dumped like this with subtyping:

usertyped

To do this, hook the correct core type and provide a function that classifies and processes the raw value, then modifies and returns an instance of Type. Here are the properties that can be modified/augmented:

  1. $type->types - Array of subtype string(s) of your choice. These get appended as CSS classes and are also displayed inline.
  2. $type->nodes - Array of expandable subnodes to display. Provide null if no subnodes are needed or to retain any subnodes extracted by the core type.
  3. $type->length - A string to be displayed at the end of the line, indicating length of subnodes. You can also abuse this param to display other length-esque information (the EXIF example below uses it to display image dimensions inline). Provide null to retain the default length display for the hooked core type.

All core types (see src/dump_r/Node dir) can be hooked by their fully namespaced names. For example, if you wanted to further subtype a JSON object string, you would use

Filtering, Marking & Recursion Control

Using the same Type hooks (introduced above) allows you to modify additional aspects of the renderer and iterator.

Skip specific nodes based on their properties or path in the hierarchy

Stop recursion of specific nodes

CSS-tag nodes via classes


All versions of dump-r with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package leeoniya/dump-r contains the following files

Loading the files please wait ....