|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-11-01 11:03 UTC] peehaa@php.net
-Status: Open
+Status: Not a bug
[2020-11-01 11:03 UTC] peehaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 06 20:00:02 2026 UTC |
Description: ------------ In the documentation of the setCookie() function the doc says that setCookie()'s expiry param takes input as time() + some value, which is in unix seconds, but in its example it takes time() + 60*60 *24 * 30 and comments it as 30 day time perion but the time mentioned is 1/60 of that time period, as it should multiply 60 more to it. I found that this mistake was multiple time in the documentation, have a look there. And Thanks for your awesome PHP. Test script: --------------- setCookie("name","value", "/", time() + 60*60 *24 * 30); # This is 1/60th of 30 days #it should be setCookie("name","value", "/", time() + 60*60 *24 * 30 * 60); # One more 60 multiplied