|  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: 2022-05-13 14:05 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: derick (profile)
Status: Closed Package: Date/time related
PHP Version: 5.5.8 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
New email:
PHP Version: OS:


 [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
 [2022-05-13 14:05 UTC]
-Status: Re-Opened +Status: Closed -Assigned To: +Assigned To: derick
 [2022-05-13 14:05 UTC]
I'm closing this (and the duplicate), as I am confused about this. Please open a new ticket at if this is still a pressing issue.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Feb 25 20:01:28 2024 UTC