mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
added example
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@148088 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
632cd61ec8
commit
bc61e0549e
2 changed files with 52 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/datetime.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.checkdate">
|
||||
<refnamediv>
|
||||
|
@ -38,6 +38,28 @@
|
|||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title><function>checkdate</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
var_dump(checkdate(12, 31, 2000));
|
||||
var_dump(checkdate(2, 29, 2001));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
The above example will output:
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
bool(true)
|
||||
bool(false)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>mktime</function> and <function>strtotime</function>.
|
||||
</para>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/datetime.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.gettimeofday">
|
||||
<refnamediv>
|
||||
|
@ -39,6 +39,34 @@
|
|||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>
|
||||
<function>gettimeofday</function> example
|
||||
</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
print_r(gettimeofday());
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
The output will look similar to:
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Array
|
||||
(
|
||||
[sec] => 1073504408
|
||||
[usec] => 238215
|
||||
[minuteswest] => 0
|
||||
[dsttime] => 1
|
||||
)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
|
Loading…
Reference in a new issue