|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-02-20 10:04 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 08 20:00:02 2025 UTC |
Description: ------------ strtotime issue Reproduce code: --------------- $datestring = '02/31/2008'; if(strtotime($datestring)) {echo date('d/m/Y',strtotime($datestring));} else {echo 'not valid date'; exit;} Expected result: ---------------- expect FALSE on 02/30/2008 and 02/31/2008 addl comment: Have not tested for leap yrs, but hope they will work as well. Actual result: -------------- function accepts 02/30/2008 and 02/31/2008 as valid dates, and when I return either timestamp back as a date it returns 02/03/2008. I AM ACTUALLY USING 5.2.6. I submitted bug because I imagine it would have to have been fixed by this version if fixed. If this is already fixed, thanks.