PHP code example of twilightgluck / debug

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

    

twilightgluck / debug example snippets


use TwilightGluck\Debug;

Debug::log($value, 'пояснение');
Debug::send();

$user = l($repository->find($id), 'user');

$content = r();

s();

c();

h();

t();

t(true);

sh();

$result = ls($service->run(), 'result');

lsh($result, 'result');

$start = microtime(true);

// Первый этап.

Debug::time($start, 'first step');

// Второй этап.

Debug::time($start, 'second step');
Debug::send();

$time = microtime(true);

// Первый этап.

$time = Debug::time($time, 'first step');

// Второй этап.

$time = Debug::time($time, 'second step');
Debug::send();

Debug::count('name1');
Debug::count('name1', 4);
Debug::send();

Debug::memory('memory');
Debug::send();

Debug::$useSystemDumper = true;

Debug::$useSystemDumper = false;