Shakti Singh Shakti Singh - 1 year ago 57
PHP Question

When does a cookie with expiration time 'At end of session' expire?

There is a session cookie with expiration time which says 'At end of session'.
When exactly does it expire or will it be alive forever?

Answer Source

When you use setcookie, you can either set the expiration time to 0 or simply omit the parametre - the cookie will then expire at the end of session (ie, when you close the browser).