#47084 [Com]: Calling mktime() w/o arguments raises strict error
| From: | apradhan at sampatti dot com | Date: | Sat, 01 Aug 2009 06:14:38 +0000 |
| Subject: | #47084 [Com]: Calling mktime() w/o arguments raises strict error | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-2586@lists.php.net to get a copy of this message | ||
ID: 47084
Comment by: apradhan at sampatti dot com
Reported By: tacker@php.net
Status: Open
Bug Type: Documentation problem
Operating System: Irrelevant
PHP Version: Irrelevant
New Comment:
I have seen a issue in mktime() for the date of 31 july
like if we write
echo date("m",mktime(0,0,0,07-1,31, 2009));
Above code will give output : 07
while logically it should be 6.
Previous Comments:
------------------------------------------------------------------------
[2009-01-13 10:25:20] tacker@php.net
Description:
------------
This code below will generate a strict error.
Also the documentation
a) states that mktime() can be called w/o arguments
int mktime ([ int $Stunde [, int $Minute [, int $Sekunde [, int
$Monat [, int $Tag [, int $Jahr [, int $is_dst ]]]]]]] )
b) does not recommend using time() instead of mktime()
Reproduce code:
---------------
<?php
mktime();
?>
Actual result:
--------------
Strict standards: mktime(): You should be using the time() function
instead
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47084&edit=1