#33536 [Opn->Asn]: strtotime defaults to now even on non time string

From: Date: Fri, 01 Jul 2005 15:17:08 +0000
Subject: #33536 [Opn->Asn]: strtotime defaults to now even on non time string
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-81270@lists.php.net to get a copy of this message
ID: 33536 Updated by: derick@php.net Reported By: bo at theaddedones dot com -Status: Open +Status: Assigned Bug Type: Date/time related Operating System: OS X PHP Version: 5CVS-2005-07-01 (dev) -Assigned To: +Assigned To: derick New Comment: This is already on my todo list... Previous Comments: ------------------------------------------------------------------------ [2005-07-01 17:12:39] bo at theaddedones dot com Description: ------------ best by example ---snip--- print strtotime("monkey") ."\n"; print date("Y-m-d", strtotime("monkey")) ."\n"; exit; ---snip--- OUTPUT 1120230396 2005-07-01 --- who knew that monkey meant 'now' (it also defaults to now on various other strings) Reproduce code: --------------- <?php print strtotime("monkey") ."\n"; print date("Y-m-d", strtotime("monkey")) ."\n"; exit; ?> Expected result: ---------------- i expect to see 'false' Actual result: -------------- 1120230396 2005-07-01 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33536&edit=1

« previous php.bugs (#81270) next »