ID: 29879 User updated by: info at peter-thomassen dot de Reported By: info at peter-thomassen dot de Status: Wont fix Bug Type: Date/time related Operating System: any PHP Version: Irrelevant New Comment:
That's right, but I think -- since PHP5 is not that established to avoid any minor changes -- you can keep the old behaviour if zend.ze1_compatibility_mode is set to On and otherwise use more meaningful return values, can't you? I find it kind of sad if there wouldn't be any possibility to do proper date calculations, but another would be overkill ... Previous Comments: ------------------------------------------------------------------------ [2004-08-29 19:01:48] [EMAIL PROTECTED] This change would break backwards compatibility. ------------------------------------------------------------------------ [2004-08-29 00:50:56] info at peter-thomassen dot de Description: ------------ If an invalid time is specified, strtotime() returns -1. Because -1 is ambiguous (it could also mean 1969-12-31 23:59:59 UTC), I request to return (bool)false on failure. BTW: http://www.gnu.org/software/tar/manual/html_chapter/tar_7.html#SEC117 which is mentioned in the docs allows a number preceded by an '@' for the time argument to represent seconds since the epoch. This results in an error -- shall I report another bug for that? Thanks! Reproduce code: --------------- <?php var_dump(strtotime('invalid')); ?> Expected result: ---------------- bool(false) Actual result: -------------- int(-1) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29879&edit=1
