Is there a way to delete a cookie in PHP without changing its expiration date?

When deleting a cookie in PHP, the expiration date cannot be changed directly. However, you can set the cookie's value to an empty string and set the expiration date to a time in the past to effectively delete the cookie. This will prompt the browser to remove the cookie from the client's machine.

// Set the cookie's value to an empty string and expiration date to a time in the past
setcookie("cookie_name", "", time() - 3600, "/");