reference/datetime/functions/mktime.xml
57e27d2a7615da2ee6de57ed27eb40b473d487cb
...
...
@@ -24,12 +24,22 @@
24
24
specified.
25
25
</para>
26
26
<para>
27
-
Arguments may be left out in order from right to left; any
28
-
arguments thus omitted will be set to the current value according
27
+
Any optional
28
+
arguments omitted or &null; will be set to the current value according
29
29
to the local date and time.
30
30
</para>
31
+
<warning>
32
+
<para>
33
+
Please note that the ordering of arguments is in an odd order:
34
+
<parameter>month</parameter>, <parameter>day</parameter>,
35
+
<parameter>year</parameter>, and not in the more reasonable order of
36
+
<parameter>year</parameter>, <parameter>month</parameter>,
37
+
<parameter>day</parameter>.
38
+
</para>
39
+
</warning>
31
40
<simpara>
32
-
Calling <function>mktime</function> without arguments is deprecated.
41
+
Calling <function>mktime</function> without arguments is not supported,
42
+
and will result in an <classname>ArgumentCountError</classname>.
33
43
<function>time</function> can be used to get the current timestamp.
34
44
</simpara>
35
45
</refsect1>
...
...
@@ -112,16 +122,10 @@
112
122
&reftitle.returnvalues;
113
123
<para>
114
124
<function>mktime</function> returns the Unix timestamp of the arguments
115
-
given.
116
-
If the arguments are invalid, the function returns &false;.
125
+
given, or &false; if the timestamp doesn't fit in a PHP integer.
117
126
</para>
118
127
</refsect1>
119
128

120
-
<refsect1 role="errors">
121
-
&reftitle.errors;
122
-
&date.timezone.errors.description;
123
-
</refsect1>
124
-

125
129
<refsect1 role="changelog">
126
130
&reftitle.changelog;
127
131
<para>
...
...
@@ -137,7 +141,8 @@
137
141
<row>
138
142
<entry>8.0.0</entry>
139
143
<entry>
140
-
<parameter>hour</parameter> is no longer optional.
144
+
<parameter>hour</parameter> is no longer optional. If you need a Unix
145
+
timestamp, use <function>time</function>.
141
146
</entry>
142
147
</row>
143
148
<row>
...
...
@@ -221,6 +226,7 @@ echo strftime("Last day in Feb 2000 is: %d", $lastday);
221
226
&reftitle.seealso;
222
227
<para>
223
228
<simplelist>
229
+
<member>The <classname>DateTimeImmutable</classname> class</member>
224
230
<member><function>checkdate</function></member>
225
231
<member><function>gmmktime</function></member>
226
232
<member><function>date</function></member>
227
233