parse_cookie_header.php
Table of Contents
Functions
- parseCookieHeader() : array<non-empty-string, string>
- Parse a cookie header according to RFC 6265.
Functions
parseCookieHeader()
Parse a cookie header according to RFC 6265.
parseCookieHeader(string $cookieHeader) : array<non-empty-string, string>
PHP will replace special characters in cookie names, which results in other cookies not being available due to overwriting. Thus, the server request should take the cookies from the request header instead.
Parameters
- $cookieHeader : string
-
A string cookie header value.
Return values
array<non-empty-string, string> —key/value cookie pairs.