public static function ErrorHandlerHTML($e_no, string $e_str, string $e_file, string $e_line)
    {
        $e_str = strpos($e_str, ':::') === false ? ['', $e_str] : explode(':::', $e_str);

        if (IS_CLI || IS_AJAX_REQUEST) {
            echo self::getErrorTextByNumber($e_no) . "\n";

            if ($e_str[0] === 'sql') {
                echo 'SQL error<br>' . SQL::getLastError() . '<br>' . $e_str[1];
            } else {
                echo 'PHP error in file <strong>' . $e_file . ' : ' . $e_line . '</strong><br>"' . preg_replace('/\"([^"]+)\"/', '"<strong>\\1</strong>"', $e_str[1]) . '"';
                echo "\n" . 'Location: ' . $e_file . ':' . $e_line . "\n";

                echo 'Error: ' . $e_str[1] . "\n";

                self::outputDebugStackTable();

                return;
            }
        }

        echo '<html><head><title>Error</title><style>table {border-collapse:collapse}</style></head><body>
<fieldset><legend>Error ' . self::getErrorTextByNumber($e_no), '</legend><br><table width="100%"><tr><td valign="top">';

        if ($e_str[0] === 'sql') {
            echo 'SQL error<br>' . SQL::getLastError() . '<br>' . $e_str[1];
        } else {
            echo preg_replace('/\"([^"]+)\"/', '"<strong>\\1</strong>"', $e_str[1]) . '';
        }

        echo '<br><br>File <strong>' . $e_file . ' : ' . $e_line . '</strong> </td><td valign="top">';

        self::outputDebugStackTable();

        echo '<br>';

        self::printGlobalArraysParams();

        echo '</fieldset></body></html>';
    }
public static function ErrorHandlerHTML($e_no, string $e_str, string $e_file, string $e_line)
    {
        $e_str = strpos($e_str, ':::') === false ? ['', $e_str] : explode(':::', $e_str);

        if (IS_CLI || IS_AJAX_REQUEST) {
            echo self::getErrorTextByNumber($e_no) . "\n";

            if ($e_str[0] === 'sql') {
                echo 'SQL error<br>' . SQL::getLastError() . '<br>' . $e_str[1];
            } else {
                echo 'PHP error in file <strong>' . $e_file . ' : ' . $e_line . '</strong><br>"' . preg_replace('/\"([^"]+)\"/', '"<strong>\\1</strong>"', $e_str[1]) . '"';
                echo "\n" . 'Location: ' . $e_file . ':' . $e_line . "\n";

                echo 'Error: ' . $e_str[1] . "\n";

                self::outputDebugStackTable();

                return;
            }
        }

        echo '<html><head><title>Error</title><style>table {border-collapse:collapse}</style></head><body>
<fieldset><legend>Error ' . self::getErrorTextByNumber($e_no), '</legend><br><table width="100%"><tr><td valign="top">';

        if ($e_str[0] === 'sql') {
            echo 'SQL error<br>' . SQL::getLastError() . '<br>' . $e_str[1];
        } else {
            echo preg_replace('/\"([^"]+)\"/', '"<strong>\\1</strong>"', $e_str[1]) . '';
        }

        echo '<br><br>File <strong>' . $e_file . ' : ' . $e_line . '</strong> </td><td valign="top">';

        self::outputDebugStackTable();

        echo '<br>';

        self::printGlobalArraysParams();

        echo '</fieldset></body></html>';
    }
public static function ErrorHandlerHTML ( $ e_no , string $ e_str , string $ e_file , string $ e_line ) { $ e_str = strpos ( $ e_str , ':::' ) === false ? [ '' , $ e_str ] : explode ( ':::' , $ e_str ) ; if ( IS_CLI || IS_AJAX_REQUEST ) { echo self :: getErrorTextByNumber ( $ e_no ) . "\n" ; if ( $ e_str [ 0 ] === 'sql' ) { echo 'SQL error<br>' . SQL :: getLastError ( ) . '<br>' . $ e_str [ 1 ] ; } else { echo 'PHP error in file <strong>' . $ e_file . ' : ' . $ e_line . '</strong><br>"' . preg_replace ( '/\"([^"]+)\"/' , '"<strong>\\1</strong>"' , $ e_str [ 1 ] ) . '"' ; echo "\n" . 'Location: ' . $ e_file . ':' . $ e_line . "\n" ; echo 'Error: ' . $ e_str [ 1 ] . "\n" ; self :: outputDebugStackTable ( ) ; return ; } } echo '<html><head><title>Error</title><style>table {border-collapse:collapse}</style></head><body>
<fieldset><legend>Error ' . self :: getErrorTextByNumber ( $ e_no ) , '</legend><br><table width="100%"><tr><td valign="top">' ; if ( $ e_str [ 0 ] === 'sql' ) { echo 'SQL error<br>' . SQL :: getLastError ( ) . '<br>' . $ e_str [ 1 ] ; } else { echo preg_replace ( '/\"([^"]+)\"/' , '"<strong>\\1</strong>"' , $ e_str [ 1 ] ) . '' ; } echo '<br><br>File <strong>' . $ e_file . ' : ' . $ e_line . '</strong> </td><td valign="top">' ; self :: outputDebugStackTable ( ) ; echo '<br>' ; self :: printGlobalArraysParams ( ) ; echo '</fieldset></body></html>' ; }
Plain text for terminals and error logs

@param int    $e_no
@param string $e_str
@param string $e_file
@param string $e_line
Plain text for terminals and error logs