diff --git a/src/Symfony/Component/VarDumper/Resources/functions/dump.php b/src/Symfony/Component/VarDumper/Resources/functions/dump.php index e6ade0dfaed38..1b162c1a955d6 100644 --- a/src/Symfony/Component/VarDumper/Resources/functions/dump.php +++ b/src/Symfony/Component/VarDumper/Resources/functions/dump.php @@ -66,3 +66,22 @@ function dd(mixed ...$vars): never exit(1); } } + +if (!function_exists('jd')) { + function jd(mixed ...$vars): never + { + if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true) && !headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + + if (array_key_exists(0, $vars) && 1 === count($vars)) { + var_dump($vars[0]); + } else { + foreach ($vars as $var) { + var_dump($var); + } + } + + exit(1); + } +}
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: