#42361 [Bgs]: strtotime() can't return any properly result
| From: | s679160 at yandex dot ru | Date: | Wed, 22 Aug 2007 07:33:19 +0000 |
| Subject: | #42361 [Bgs]: strtotime() can't return any properly result | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-116516@lists.php.net to get a copy of this message | ||
ID: 42361
User updated by: s679160 at yandex dot ru
Reported By: s679160 at yandex dot ru
Status: Bogus
Bug Type: Date/time related
Operating System: Linux
PHP Version: 5.2.3
New Comment:
Thank you !
I find mistake. MY browser show russian help page usign your link and
in the russian page present old version of return value.
In newer russian CHM helpfile too :(.
In newer English CHM helpfile all is OK.
Previous Comments:
------------------------------------------------------------------------
[2007-08-22 06:43:35] derick@php.net
No, it already says this (http://no.php.net/strtotime):
Return Values
Returns a timestamp on success, FALSE otherwise. Previous to PHP 5.1.0,
this function would return -1 on failure.
------------------------------------------------------------------------
[2007-08-22 06:27:11] s679160 at yandex dot ru
But in manual i see next:
if error occurs function return (-1).
May be it is mistake in manual ?
------------------------------------------------------------------------
[2007-08-21 14:55:28] derick@php.net
it returns false:
derick@kossu:~$ php -r 'var_dump(Strtotime("2006-06-446"));'
bool(false)
------------------------------------------------------------------------
[2007-08-21 14:33:18] s679160 at yandex dot ru
So, but why function don't return error value (-1) ?
------------------------------------------------------------------------
[2007-08-21 14:14:48] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
2006-06-446 is clearly not a valid date.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/42361
--
Edit this bug report at http://bugs.php.net/?id=42361&edit=1