|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55619 checkdate() returns incorrect results
Submitted: 2011-09-06 11:33 UTC Modified: 2011-09-06 12:03 UTC
From: invisiblexman2010 at gmail dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 5.3.2 OS: linux 2.6.32-33-generic on i686
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
19 + 17 = ?
Subscribe to this entry?

 [2011-09-06 11:33 UTC] invisiblexman2010 at gmail dot com
Function checkdate() returns incorrect results in some cases, when passed February 29 leap year.

Test script:
var_dump(checkdate('02', '29', '2100'));
var_dump(checkdate('02', '29', '1900'));

Expected result:
bool(true) bool(true)

Actual result:
bool(false) bool(false)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-09-06 11:46 UTC] invisiblexman2010 at gmail dot com
-Summary: incorrect results +Summary: checkdate() returns incorrect results -PHP Version: Irrelevant +PHP Version: 5.3.2
 [2011-09-06 11:46 UTC] invisiblexman2010 at gmail dot com
Update Summary section
 [2011-09-06 12:03 UTC]
-Status: Open +Status: Bogus
 [2011-09-06 12:03 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

This is correct behaviour:
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jul 19 09:01:28 2024 UTC