ID: 29879 Updated by: [EMAIL PROTECTED] Reported By: info at peter-thomassen dot de -Status: Open +Status: Wont fix Bug Type: Date/time related Operating System: any PHP Version: Irrelevant New Comment:
This change would break backwards compatibility. Previous Comments: ------------------------------------------------------------------------ [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
