$_COOKIE returns an array if there are more than one cookie saved under the given key.
$_COOKIE returns an array if there are more than one cookie saved under the given key.
Cookies with the same name the first cookie is used. Clients will send cookies with longer path before cookies with shorter path. This comes from RFC 6265 which says "Cookies with longer paths are listed before cookies with shorter paths.". So you get the best matching cookie for your current request.
To clarify the previously posted note:
Dots (.) and spaces ( ) in cookie names are being replaced with underscores (_).
beware, dots (.) in cookie names are replaces by underscores (_)