PHP code example of faydaen / dumper

1. Go to this page and download the library: Download faydaen/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/ */

    

faydaen / dumper example snippets


dd('hello');

dd(42);

dd(3.14);

dd(true);

dd(null);

dd([]);

dd(['cat', 'dog', 'horse']);

dd(['planet'=>'Mars', 'hasAtmosphere'=>true, 'satellites'=>2]);

    class User {
        public $name;
        public $age;
        protected $someProtectedField;

        public function __construct (){
            $this->name = 'John Doe';
            $this->age = 32;
        }
    }
    // will be shown only public fields
    dd(new User());