Q:

PHP- How to renew cookie expiration date?

I am setting a cookie that is good for 3 days:
setcookie('whatever', 'value', time() + (86400 * 3), "/");

If and when the user does something else at a later point in time, I want to renew this cookie's expiration date. I don't need to update it's value or anything- just renew the 3 days expiration date.
How is this most simply done?
From what I understand, I have two options:
1: Redeclaring the value of the cookie
Like:
$value = $_COOKIE['whatever'];
$_COOKIE['whatever'] = $value;

Re-setting the cookie altogether

Like:
$value = $_COOKIE['whatever'];
setcookie('whatever', $value, time() + (86400 * 3), "/");

How would you go about just re-initiating the expiration date of a cookie?

A:

2 is the right way to do it.
$value = $_COOKIE['whatever'];
setcookie('whatever', $value, time() + (86400 * 3), "/");

