svn: /phpdoc/en/trunk/language/ oop5/constants.xml types/string.xml
| From: | Christoph Michael Becker | Date: | Mon, 10 Aug 2015 12:50:32 +0000 |
| Subject: | svn: /phpdoc/en/trunk/language/ oop5/constants.xml types/string.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-13561@lists.php.net to get a copy of this message | ||
cmb Mon, 10 Aug 2015 12:50:32 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=337388
Log:
updated manual wrt. Heredoc support for initializing consts and static members (fixes #70227)
Bug: https://bugs.php.net/70227 (Open) Define consts with
heredocs/nowdocs
Changed paths:
U phpdoc/en/trunk/language/oop5/constants.xml
U phpdoc/en/trunk/language/types/string.xml
Modified: phpdoc/en/trunk/language/oop5/constants.xml
===================================================================
--- phpdoc/en/trunk/language/oop5/constants.xml 2015-08-10 11:54:27 UTC (rev 337387)
+++ phpdoc/en/trunk/language/oop5/constants.xml 2015-08-10 12:50:32 UTC (rev 337388)
@@ -58,17 +58,18 @@
const BAR = <<<'EOT'
bar
EOT;
+ // As of PHP 5.3.0
+ const BAZ = <<<EOT
+baz
+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.
+ Support for initializing constants with Heredoc and Nowdoc syntax was added in PHP 5.3.0.
</para>
</note>
<example>
Modified: phpdoc/en/trunk/language/types/string.xml
===================================================================
--- phpdoc/en/trunk/language/types/string.xml 2015-08-10 11:54:27 UTC (rev 337387)
+++ phpdoc/en/trunk/language/types/string.xml 2015-08-10 12:50:32 UTC (rev 337388)
@@ -451,13 +451,6 @@
</screen>
</example>
- <note>
- <para>
- Unlike heredocs, nowdocs can be used in any static data context. The
- typical example is initializing class properties or constants:
- </para>
- </note>
-
<example>
<title>Static data example</title>
<programlisting role="php">