|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: velosipedist dot org at gmail dot com
New email:
PHP Version: OS:


 [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-2021 The PHP Group
All rights reserved.
Last updated: Thu Jun 24 19:07:23 2021 UTC