Home>Article>Backend Development> What does it mean when the timestamp in setcookie in php is 0?
The timestamp in setcookie in php is 0, which means setting the expiration time to 0. That is, when the cookie value is set to 0, the cookie will be cleared immediately when the user exits the browser.
The operating environment of this article: Windows 7 system, PHP version 7.1, DELL G3 computer
Time stamp in setcookie in php What does 0 mean?
PHP setcookie() The expiration time is set to 0
When the cookie value is set to 0
If chrome exits, the cookie will be cleared.
Because the behavior of Windows and Mac are different. On Windows, as long as I close all the windows of the browser, chrome will exit and the cache will be cleared. On MAC, chrome can only force quit when chrome exits. It will be cleared.
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of What does it mean when the timestamp in setcookie in php is 0?. For more information, please follow other related articles on the PHP Chinese website!