PHP code example of donquixote / nicetrace

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

    

donquixote / nicetrace example snippets


use Donquixote\Nicetrace\Util\NicetraceUtil;

$backtrace = debug_backtrace();
$nicetrace = NicetraceUtil::backtraceGetNicetrace($backtrace);

// Choose your favourite recursive function/method for recursive printing.
print_r($nicetrace);

use Donquixote\Nicetrace\BacktraceToNicetrace\BacktraceToNicetraceBuilder;

$backtrace = debug_backtrace();
$backtraceToNicetrace = BacktraceToNicetraceBuilder::start()
  ->withClasslessKey()
  ->create();
$nicetrace = NicetraceUtil::backtraceGetNicetrace($backtrace);

// Choose your favourite recursive function/method for recursive printing.
print_r($nicetrace);