What is the difference between $_COOKIE and $COOKIE in PHP?

The difference between $_COOKIE and $COOKIE in PHP is that $_COOKIE is a superglobal array that contains all cookies sent by the client, while $COOKIE is just a regular variable that does not have any predefined meaning in PHP. Therefore, when working with cookies in PHP, it is important to use $_COOKIE to access the values stored in cookies.

// To access a cookie value, always use $_COOKIE
$cookieValue = $_COOKIE['cookie_name'];