note 34367 deleted from function.strtotime by nicos
| From: | nicos@php.net | Date: | Fri, 25 Jul 2003 09:30:52 +0000 |
| Subject: | note 34367 deleted from function.strtotime by nicos | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-52624@lists.php.net to get a copy of this message | ||
Note Submitter: alex plooy
----
Re Tim Fountain's note on 0 vs -1 return: the suggestion that "both values would be the
same" is not strictly true, as 0 !== false (checking for boolean type match). Compare this with
the return for strpos() where a return of 0 means "match found at the first character",
but a return of false (boolean) means "no match found". The difference in these return
values (false vs -1) seems to be an inconsistency in PHP's behaviour to me - why then
doesn't strtotime return false, or strpos return -1, on failure? Maybe there's a good
reason for this - feel free to clarify/argue...