php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77952 strtotime() return error
Submitted: 2019-04-29 09:15 UTC Modified: 2019-04-29 09:21 UTC
From: gaozhiyong at hotmail dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 7.1.28 OS: MacOS Mojava
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: gaozhiyong at hotmail dot com
New email:
PHP Version: OS:

 

 [2019-04-29 09:15 UTC] gaozhiyong at hotmail dot com
Description:
------------
February has no 31th, but function strtotime() not return false,February、April、june, September,November included

Test script:
---------------
<?php
$a =  '2019-2-31';
$b = strtotime($a);
echo $b;


Expected result:
----------------
false

Actual result:
--------------
1551542400


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-04-29 09:21 UTC] requinix@php.net
-Status: Open +Status: Not a bug -Package: *Data Exchange functions +Package: Date/time related
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 21:01:27 2025 UTC