This function's parameters are designed to be analogous to setcookie(). Function parameters
expire, path, domain, secure, and httponly may be passed in as an associative array
alongside value inside $value.
NOTE: Cookies values are expected to be scalar. This function will not serialize cookie values.
If you wish to store a non-scalar value, you must serialize the data first.
NOTE: Cookie values are stored as an associative array containing at minimum a value key.
Cookies which have been set multiple times do not overwrite each other. Rather they are stored
as an array of associative arrays.