Bug #78616 [Opn->Nab]: unexpected behaviour of date function
| From: | cmb@php.net | Date: | Tue, 01 Oct 2019 07:42:34 +0000 |
| Subject: | Bug #78616 [Opn->Nab]: unexpected behaviour of date function | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-222971@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78616&edit=1
ID: 78616
Updated by: cmb@php.net
Reported by: tanmuhittin at gmail dot com
Summary: unexpected behaviour of date function
-Status: Open
+Status: Not a bug
Type: Bug
Package: Date/time related
Operating System: ubuntu
PHP Version: Irrelevant
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
See <https://www.php.net/manual/en/language.types.integer.php#language.types.integer.casting.from-boolean>.
Previous Comments:
------------------------------------------------------------------------
[2019-10-01 06:45:59] tanmuhittin at gmail dot com
Description:
------------
especially when using date function with strtotime this behavior may result problems since strtotime
returns false when invalid argument is supplied but date function will not
Test script:
---------------
<?php
echo date('Y-m-d',false);
echo date('Y-m-d',0);
Expected result:
----------------
false
01-01-1970
Actual result:
--------------
01-01-1970
01-01-1970
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78616&edit=1