public static function sendHeaders(): void
    {
        if (!(SOCKET || headers_sent())) {
            if (isset($_SESSION['Cookies']) && \is_array($_SESSION['Cookies'])) {
                foreach ($_SESSION['Cookies'] as $key => $array) {
                    if ($array[1] ?? false) {
                        static::setCookie($key, $array[0] ?? null, $array[1]);
                    } else {
                        static::setCookie($key, $array[0] ?? null);
                    }
                }
            }

            if (isset($_SESSION['Headers']) && \is_array($_SESSION['Headers'])) {
                foreach ($_SESSION['Headers'] as $value) {
                    static::setHeader($value);
                }
            }
            unset($_SESSION['Cookies'], $_SESSION['Headers']);
        }
    }
public static function sendHeaders(): void
    {
        if (!(SOCKET || headers_sent())) {
            if (isset($_SESSION['Cookies']) && \is_array($_SESSION['Cookies'])) {
                foreach ($_SESSION['Cookies'] as $key => $array) {
                    if ($array[1] ?? false) {
                        static::setCookie($key, $array[0] ?? null, $array[1]);
                    } else {
                        static::setCookie($key, $array[0] ?? null);
                    }
                }
            }

            if (isset($_SESSION['Headers']) && \is_array($_SESSION['Headers'])) {
                foreach ($_SESSION['Headers'] as $value) {
                    static::setHeader($value);
                }
            }
            unset($_SESSION['Cookies'], $_SESSION['Headers']);
        }
    }
public static function sendHeaders ( ) : void { if ( ! ( SOCKET || headers_sent ( ) ) ) { if ( isset ( $ _SESSION [ 'Cookies' ] ) && \ is_array ( $ _SESSION [ 'Cookies' ] ) ) { foreach ( $ _SESSION [ 'Cookies' ] as $ key => $ array ) { if ( $ array [ 1 ] ?? false ) { static :: setCookie ( $ key , $ array [ 0 ] ?? null , $ array [ 1 ] ) ; } else { static :: setCookie ( $ key , $ array [ 0 ] ?? null ) ; } } } if ( isset ( $ _SESSION [ 'Headers' ] ) && \ is_array ( $ _SESSION [ 'Headers' ] ) ) { foreach ( $ _SESSION [ 'Headers' ] as $ value ) { static :: setHeader ( $ value ) ; } } unset ( $ _SESSION [ 'Cookies' ] , $ _SESSION [ 'Headers' ] ) ; } }
Headers can only be sent and set if output has not already started.
If we attempt to set a header after output has started, store it and
send on the next request.
@return void
Headers can only be sent and set if output has not already started . If we attempt to set a header after output has started store it and send on the next request .