for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Webino (http://webino.sk/)
*
* @link https://github.com/webino/exceptions for the canonical source repository
* @copyright Copyright (c) 2019 Webino, s. r. o. (http://webino.sk/)
* @author Peter Bačinský <[email protected]>
* @license BSD-3-Clause
*/
namespace Webino;
use Tracy\Debugger;
use Webino\DevException;
* Alias for var_dump()
* @param mixed $subject
function d($subject)
{
var_dump($subject);
var_dump($subject)
}
* Diyng var_dump()
function dd($subject)
exit;
exit
In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.
* Alias for print_r() scream
function p($subject)
if (class_exists(Debugger::class)) {
Debugger::dump($subject);
return;
print_r($subject);
* Dying print_r() scream
function pd($subject)
* Alias for print_r() return
* @return string
function pr($subject)
return Debugger::dump($subject, true);
return print_r($subject, true);
* Debugger bar dump
function bd($subject)
Debugger::barDump($subject);
* Web debugger break point
* Sometimes is useful by throwing an exception to check a backtrace.
* @param string $msg
* @throws Exception
function e(string $msg = '')
throw new DevException($msg);