|  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
 [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-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 24 00:01:30 2024 UTC