Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Swoole\Http\ResponseSwoole\Http\Response::__destruct>
^Swoole\Http\ResponseLast updated: Mon, 26 Oct 2026

Swoole\Http\Response::cookie

(PECL swoole >= 1.9.0)

Swoole\Http\Response::cookie — Set the cookies of the HTTP response.

Description

public function Swoole\Http\Response::cookie(
    string $name,
    string $value = ?,
    string $expires = ?,
    string $path = ?,
    string $domain = ?,
    string $secure = ?,
    string $httponly = ?
): string

Parameters

name

value

expires

path

domain

secure

httponly

Return Values


<Swoole\Http\ResponseSwoole\Http\Response::__destruct>
^Swoole\Http\ResponseLast updated: Mon, 26 Oct 2026