Setrawcookie
Setrawcookie is a PHP function that sends a Set-Cookie header with a raw, unencoded value. It is like setcookie but does not URL-encode the value, allowing certain characters to pass through unchanged. This can be useful for storing data that encoding would alter, but it increases the risk of malformed headers if the value contains characters such as semicolons.
Syntax and parameters: setrawcookie(string $name, string $value = "", int $expire = 0, string $path = "", string $domain = "", bool
Usage example: setrawcookie('prefs', 'lang=en|theme=dark', time() + 3600, '/'); This creates a cookie named prefs for one hour on
Considerations: since the value is not encoded, avoid semicolons and characters that could break the header,
Relation to setcookie: setcookie applies URL encoding to the value, while setrawcookie does not. Choose based