An exit expression should only be used in rare cases. For example, if you
write a short command line script.
In most cases however, using an exit expression makes the code untestable
and often causes incompatibilities with other libraries. Thus, unless you are
absolutely sure it is required here, we recommend to refactor your code to
avoid its usage.
An exit expression should only be used in rare cases. For example, if you
write a short command line script.
In most cases however, using an exit expression makes the code untestable
and often causes incompatibilities with other libraries. Thus, unless you are
absolutely sure it is required here, we recommend to refactor your code to
avoid its usage.
An exit expression should only be used in rare cases. For example, if you
write a short command line script.
In most cases however, using an exit expression makes the code untestable
and often causes incompatibilities with other libraries. Thus, unless you are
absolutely sure it is required here, we recommend to refactor your code to
avoid its usage.
Loading history...
58
}
59
60
/**
61
* Alias for print_r() return
62
*
63
* @param mixed $subject
64
* @return string
65
*/
66
function pr($subject) {
67
if (class_exists(Debugger::class)) {
68
return Debugger::dump($subject, true);
69
}
70
return print_r($subject, true);
71
}
72
73
/**
74
* Debugger bar dump
75
*
76
* @param mixed $subject
77
*/
78
function bd($subject) {
79
if (class_exists(Debugger::class)) {
80
Debugger::barDump($subject);
81
}
82
}
83
84
/**
85
* Web debugger break point
86
*
87
* Sometimes is useful by throwing an exception to check a backtrace.
88
*
89
* @link https://github.com/webino/WebinoDebugLib Web debugger
90
* @param string $msg
91
*/
92
function e($msg = '') {
93
throw new \WebinoDevLib\Exception\DevelopmentException($msg);