|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67109 First uppercase letter breaks date string parsing
Submitted: 2014-04-22 08:33 UTC Modified: 2014-04-22 13:50 UTC
From: velosipedist dot org at gmail dot com Assigned: derick (profile)
Status: Closed Package: Date/time related
PHP Version: 5.5.11 OS: any
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:
32 + 15 = ?
Subscribe to this entry?

 [2014-04-22 08:33 UTC] velosipedist dot org at gmail dot com
If i make first letter uppercase in date string "last day of this month", strtotime returns FIRST day.
But same mixed-case string can be parsed correctly in unpredictable order:\

Test script:
assert(date('d',strtotime('last day of april')) == "30");
assert(date('d',strtotime('last Day of april')) == "30");
// will raise warning
assert(date('d',strtotime('Last Day of april')) == "30");


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-04-22 13:50 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: derick
 [2014-08-18 19:28 UTC]
Automatic comment on behalf of
Log: Fixed bug #67109: First uppercase letter breaks date string parsing.
 [2014-08-18 19:28 UTC]
-Status: Assigned +Status: Closed
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Nov 29 10:01:24 2020 UTC