What are some potential issues or risks associated with setting eternal cookies in PHP?

One potential issue with setting eternal cookies in PHP is that it can lead to security vulnerabilities, as the cookie will never expire unless manually deleted by the user. This can increase the risk of unauthorized access to sensitive information stored in the cookie. To mitigate this risk, it is recommended to set a reasonable expiration time for cookies to ensure they are not stored indefinitely.

// Set a cookie with an expiration time of 1 year
setcookie("cookie_name", "cookie_value", time() + 31536000, "/");