mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Add procedural example (to demonstrate the docbook format I am proposing on php-doc list).
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@298519 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
a831259930
commit
11f91796a9
1 changed files with 13 additions and 2 deletions
|
@ -68,7 +68,8 @@
|
|||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>A <function>date_modify</function> example</title>
|
||||
<title><function>DateTime::modify</function> example</title>
|
||||
<para>&style.oop;</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
@ -78,7 +79,17 @@ echo $date->format('Y-m-d');
|
|||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<para>&style.procedural;</para>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$date = date_create('2006-12-12');
|
||||
date_modify($date, '+1 day');
|
||||
echo date_format($date, 'Y-m-d');
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&examples.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
2006-12-13
|
||||
|
|
Loading…
Reference in a new issue