PHP code example of horizom / var-dumper

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

    

horizom / var-dumper example snippets


// include the class (not needed if project runs with Composer because it's auto-loaded)
out global variables
dump($GLOBALS);

dump_text($var);

~dump($var);   // html
~dump_text($var);  // text

$output = @dump($var);   // html
$output = @dump_text($var);  // text

// example: initially expand first 3 levels
\Horizom\VarDumper\VarDumper::config('expLvl', 3);
ini
[varDumper]
varDumper.expLvl = 3
varDumper.maxDepth = 4