cvs: phpdoc /en/language/oop5 basic.xml constants.xml
| From: | Felipe Pena | Date: | Fri, 18 Apr 2008 19:22:12 +0000 |
| Subject: | cvs: phpdoc /en/language/oop5 basic.xml constants.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-1530@lists.php.net to get a copy of this message | ||
felipe Fri Apr 18 19:22:12 2008 UTC
Modified files:
/phpdoc/en/language/oop5 basic.xml constants.xml
Log:
- Added example using nowdocs
http://cvs.php.net/viewvc.cgi/phpdoc/en/language/oop5/basic.xml?r1=1.25&r2=1.26&diff_format=u
Index: phpdoc/en/language/oop5/basic.xml
diff -u phpdoc/en/language/oop5/basic.xml:1.25 phpdoc/en/language/oop5/basic.xml:1.26
--- phpdoc/en/language/oop5/basic.xml:1.25 Fri Aug 17 11:58:08 2007
+++ phpdoc/en/language/oop5/basic.xml Fri Apr 18 19:22:12 2008
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.25 $ -->
+<!-- $Revision: 1.26 $ -->
<sect1 xml:id="language.oop5.basic" xmlns="http://docbook.org/ns/docbook">
<title>The Basics</title>
@@ -122,6 +122,30 @@
Functions</link>.
</para>
</note>
+
+ <para>
+ Unlike heredocs, nowdocs can be used in any static data context.
+ <example>
+ <title>Static data example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+class foo {
+ // As of PHP 5.3.0
+ public $bar = <<<'EOT'
+bar
+EOT;
+}
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ <note>
+ <para>
+ Nowdoc support was added in PHP 5.3.0.
+ </para>
+ </note>
</sect2>
<sect2 xml:id="language.oop5.basic.new">
http://cvs.php.net/viewvc.cgi/phpdoc/en/language/oop5/constants.xml?r1=1.15&r2=1.16&diff_format=u
Index: phpdoc/en/language/oop5/constants.xml
diff -u phpdoc/en/language/oop5/constants.xml:1.15 phpdoc/en/language/oop5/constants.xml:1.16
--- phpdoc/en/language/oop5/constants.xml:1.15 Thu Mar 6 16:46:37 2008
+++ phpdoc/en/language/oop5/constants.xml Fri Apr 18 19:22:12 2008
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.15 $ -->
+<!-- $Revision: 1.16 $ -->
<sect1 xml:id="language.oop5.constants" xmlns="http://docbook.org/ns/docbook">
<title>Class Constants</title>
<para>
@@ -45,7 +45,32 @@
]]>
</programlisting>
</example>
+
+ <example>
+ <title>Static data example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+class foo {
+ // As of PHP 5.3.0
+ const bar = <<<'EOT'
+bar
+EOT;
+}
+?>
+]]>
+ </programlisting>
+ <para>
+ Unlike heredocs, nowdocs can be used in any static data context.
+ </para>
+ </example>
+ <note>
+ <para>
+ Nowdoc support was added in PHP 5.3.0.
+ </para>
+ </note>
+
</sect1>
<!-- Keep this comment at the end of the file