Download the PHP package agashe/var-dumper without Composer

On this page you can find all versions of the php package agashe/var-dumper. 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 var-dumper

Var-Dumper

A variables dumper to help with debugging , designed to be a better alternative to the standard var_dump function in PHP.

Features

Installation

Documentation

To start using Var-Dumper , all what you have to do , is to include the autoload.php file into your php script , then call one of the helpers functions.

The output of the prev example will be :

For each dump call , the dumper will automatically add the time , file name and the line number , so it became easier to debug in large projects , and log files.

Var-Dumper provides 4 helper functions that could be used anywhere in your project :

d(...$vars) and dump(...$vars) Functions

Those 2 functions are identical , they both can accept any numbers of variables and will serve the output based on your output type , either it's a CLI or Web.

And here is the output :

The naming is just for sake of compatibility , like in case you wanted to replace old dumper , that use , d or dump as their function name.

dd(...$vars) Function

The dd function which stands for "dump and die" , unlike the 2 prev functions , this function will terminate the execution once the dump is complete.

In case you dump for web (in browser) , the dumper will return "500 Server Error" HTTP status code.

dump_tp_file($filePath, ...$vars) Function

Dump to file accept one mandatory argument before you path you variables for the dump. And the argument is the full path to the dump file.

Now let's check dump.txt , we should have something like :

So far the dumper supports dumping to regular .txt and .json files. In case of a .json file , the dumper will automatically detect that from the extension.

In case of .txt files , the nes dump will be appended to the original content. First it will decode the old content , append the new json formatted content , then re-encode everything and save.

So assume we have a .json file called data.json with following content :

So now let's our prev example , but this time with that json file :

Now if we opened data.json , we will find that the content was appended :

The dump_e2bab7e is just and autogenerated unique hash identifier to prevent collision between dumps.

Examples

In the following examples we will see , different kind of use cases for the dumper and how the output will look like in each of the CLI / WEB / FILE / JSON outputs.

Basic data types

Output CLI / TXT FILE :

Output JSON :

Output WEB :

Basic Data Web Output

Text patterns

Output CLI / TXT FILE :

Output JSON :

Output WEB :

Text patterns Web Output

Objects

Output CLI / TXT FILE :

Output JSON :

Output WEB :

Objects Web Output

Objects and arrays can be folded/unfolded :

Objects Web Output

Anonymous class

Output CLI / TXT FILE :

Output JSON :

Output WEB :

Anonymous class Web Output

Arrays

Output CLI / TXT FILE :

Output JSON :

Output WEB :

Arrays Web Output

Resources

Output CLI / TXT FILE :

Output JSON :

Output WEB :

Resources Web Output

Closures

Output CLI / TXT FILE :

Output JSON :

Output WEB :

Closures Web Output

Long text

Output CLI / TXT FILE :

Output JSON :

Output WEB :

Long Text Folded Web Output

And as objects and arrays , long text could be folded/unfolded by click on the text :

Long Text Unfolded Web Output

License

(Var-Dumper) released under the terms of the MIT license.


All versions of var-dumper with dependencies

PHP Build Version
Package Version
No informations.
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 agashe/var-dumper contains the following files

Loading the files please wait ....