|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-08-17 05:46 UTC] laruence@php.net
[2018-08-17 05:46 UTC] laruence@php.net
-Status: Open
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
Description: ------------ I don't really know if it's an issue in php 7.3.0 beta 1, but it used to work on php 7.2, 7.1, 7.0, 5.6 and 5.5. This function call: setcookie('name', 'value', (real)(time() + 1296000)); returns "false" and generates a warning: "Expiry date cannot have a year greater than 9999" when called in PHP 7.3.0 beta 1 If I change (real) to (int) it works fine: setcookie('name', 'value', (int)(time() + 1296000)); Test script: --------------- var_dump(setcookie('name', 'value', (real)(time() + 1296000))); Expected result: ---------------- bool(true) Actual result: -------------- Warning: Expiry date cannot have a year greater than 9999 bool(false)