public static function halt($sError, $sSubject = '', int $iCode = HttpCodes::STATUS_INTERNAL_SERVER_ERROR)
    {
        if (php_sapi_name() === 'cli' || defined('STDIN')) {

            $sSubject = trim(strip_tags($sSubject));
            $sError   = trim(strip_tags($sError));

            echo "\n";
            echo $sSubject ? 'ERROR: ' . $sSubject . ":\n" : '';
            echo $sSubject ? $sError : 'ERROR: ' . $sError;
            echo "\n\n";

        } else {
            set_status_header($iCode);
            ?>
            <style type="text/css">
                p {
                    font-family: monospace;
                    margin: 20px 10px;
                }

                strong {
                    color: red;
                }

                code {
                    padding: 5px;
                    border: 1px solid #CCC;
                    background: #EEE
                }
            </style>
            <p>
                <strong>ERROR:</strong>
                <?=$sSubject ? '<em>' . $sSubject . '</em> - ' : ''?>
                <?=$sError?>
            </p>
            <?php
        }
        exit(1);
    }