Function __global->setcookie
Definitions
sources_custom/phpstub.php
- Send a cookie.
- Is abstract?: No
- Is static?: No
- Is final?: No
- Return: bool
Parameters
Name | Type | Default | Set | Range | Description |
---|---|---|---|---|---|
$name | string | required parameter | N/A | N/A | The name |
$value | ?string | Null | N/A | N/A | The value (null: unset existing cookie) |
$expire | integer | 0 | N/A | N/A | Expiration timestamp (0: session cookie) |
$path | ?string | Null | N/A | N/A | Path (null: current URL path) |
$domain | ?string | Null | N/A | N/A | Domain (null: current URL domain) |
$secure | boolean | False | N/A | N/A | Whether the cookie is only for HTTPS |
$httponly | boolean | False | N/A | N/A | Whether the cookie will not be available to JavaScript |
Return
- Success status (fails if output already started) (null: failed also)
- Type: ?boolean
- Set: N/A
- Range: N/A