PHP code example of jvitasek / dumpanddie
1. Go to this page and download the library: Download jvitasek/dumpanddie 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/ */
jvitasek / dumpanddie example snippets
declare(strict_types = 1);
use Nette\Application\UI\Presenter;
final class TestPresenter extends Presenter {
public function actionDefault(): void
{
$price = 42;
$filename = sha1((string) ($price + time())) . '.log';
// write this
dd($price, $filename);
// instead of this
\Tracy\Debugger::barDump($price);
\Tracy\Debugger::barDump($filename);
die(1);
}
}
declare(strict_types = 1);
use Tracy\Debugger;
$filename = sha1((string) ($price + time())) . '.log';
dd($price, $filename);