Issues (1251)

functions/helpers.php (1 issue)

1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Valkyrja Framework package.
7
 *
8
 * (c) Melech Mizrachi <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Valkyrja;
15
16
use function var_dump;
17
18
/**
19
 * Dump the passed variables and die.
20
 *
21
 * @param mixed ...$args The arguments to dump
22
 *
23
 * @return never
24
 */
25
function dd(...$args): never
26
{
27
    var_dump($args);
28
29
    exit(1);
0 ignored issues
show
Using exit here is not recommended.

In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.

Loading history...
30
}
31