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:
Daniel Convissor 2010-04-25 15:55:43 +00:00
parent a831259930
commit 11f91796a9

View file

@ -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