1. Go to this page and download the library: Download agashe/var-dumper library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
agashe / var-dumper example snippets
ta 1", "data 2");
d(null , 10.59, true);
dump(null , 10.59, true);
class Foo {
public $name;
private $age;
}
$foo = new Foo();
$foo->name = "hello world";
dump_to_file(__DIR__ . '/path/to/dump.txt' , $foo);
$class = new class
{
public $name;
public function __construct()
{
$this->name = 'omar';
}
};
d($class);
dump_to_file(__DIR__ . '/data.txt', $class);
dump_to_file(__DIR__ . '/data.json', $class);
$text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris viverra at est sed vestibulum. Ut ultricies urna et bibendum sollicitudin. Maecenas suscipit bibendum ante convallis dignissim. Nulla facilisi. Sed mollis eget purus eget finibus.Donec convallis risus sit amet dapibus vehicula. Interdum et malesuada fames ac ante ipsum primis in faucibus. Vestibulum vel aliquet ante. Suspendisse vitae neque non nulla viverra blandit at at diam. Phasellus imperdiet quis lacus sed facilisis. Mauris lacinia arcu lorem, quis commodo arcu fringilla in.";
d($text);
dump_to_file(__DIR__ . '/data.txt', $text);
dump_to_file(__DIR__ . '/data.json', $text);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.