Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Checks if or where headers have been sent
headers_sent(string &$filename nullint &$line null): bool
    function dd(...$vars)

    {

        if (!
in_array(\PHP_SAPI, ['cli''phpdbg'], true) && !headers_sent()) {

            
header('HTTP/1.1 500 Internal Server Error');

        }