1. Go to this page and download the library: Download aksoyih/better-dump 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/ */
aksoyih / better-dump example snippets
// Dump and continue execution
bd($variable);
// Dump and die (stop execution)
bdd($variable);
// Labeled dump
bd($user, 'User Object');
use Aksoyih\ErrorHandler;
(new ErrorHandler())->register();
// Now even fatal errors or unhandled exceptions will be rendered by BetterDump
throw new Exception("Oops!");
use Aksoyih\BetterDump;
// Enable JSON mode
BetterDump::outputJson(true);
bd($data);
use Aksoyih\BetterDump;
// Supported editors: 'vscode', 'phpstorm'
BetterDump::setEditor('vscode');
use Aksoyih\BetterDump;
BetterDump::setRootDirectory('/path/to/your/project');
use Aksoyih\BetterDump;
BetterDump::allowProduction(true);