|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66486 strtotime on string with whitespace gives current timestamp not false
Submitted: 2014-01-15 00:24 UTC Modified: 2018-08-12 19:00 UTC
Avg. Score:4.0 ± 0.8
Reproduced:1 of 2 (50.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: Assigned:
Status: Re-Opened Package: Date/time related
PHP Version: 5.5.8 OS:
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 — but make sure to vote on the bug!
Your email address:
Solve the problem:
35 - 21 = ?
Subscribe to this entry?

 [2014-01-15 00:24 UTC]
correct: strtotime('') => bool(false)
however I did not expect: strtotime(' ') => current timestamp

I don't think this is by intention, is it?


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-01-15 00:26 UTC]
-Package: *General Issues +Package: Date/time related
 [2014-03-08 00:40 UTC] thiago at carvalho dot fm
Pull request
 [2014-03-08 20:36 UTC]
hmm, don't see much of a problem with this ... I would not classify this as a bug that needs fixing.
 [2014-04-13 23:10 UTC]
-Assigned To: +Assigned To: derick
 [2017-10-24 08:10 UTC]
-Status: Assigned +Status: Open -Assigned To: derick +Assigned To:
 [2018-08-12 18:53 UTC]
Automatic comment on behalf of
Log: Fix #66486: strtotime only with whitespaces should return false
 [2018-08-12 18:53 UTC]
-Status: Open +Status: Closed
 [2018-08-12 19:00 UTC]
-Status: Closed +Status: Re-Opened
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Aug 02 23:01:23 2021 UTC