PHP code example of logocomune / debug

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

    

logocomune / debug example snippets


// debug() or d() just display a variable
debug(['test'=>1,'d'=>'ok']);

// debug and exit
de(['test'=>1,'d'=>'ok']);

// Disable debug
\Logocomune\Debug\Debug::disable();

// Enable backtrace
\Logocomune\Debug::backtrace();

// Disable backtrace
\Logocomune\Debug::backtraceOff();

// Dump a variable with

// print_r (default mode)
\Logocomune\Debug::renderAsPrintR();

// var_dump
\Logocomune\Debug::renderAsVarDump();


// var_export
\Logocomune\Debug::renderAsVarExport();


// Symfony mechanism for exploring and dumping PHP variables
\Logocomune\Debug::renderAsSymVarDump();