LMPX.COM |
Home | Linux | Mysql | PHP | XML | ||
|
|
|||
From: Kalle Sommer Nielsen Date: Tue Aug 19 16:54:04 2008 Subject: cvs: phpdoc /en/language/types string.xml
kalle Tue Aug 19 22:54:04 2008 UTC
Modified files:
/phpdoc/en/language/types string.xml
Log:
Added example for heredoc in arguments
http://cvs.php.net/viewvc.cgi/phpdoc/en/language/types/string.xml?r1=1.12&r2=1.13&diff_format=u
Index: phpdoc/en/language/types/string.xml
diff -u phpdoc/en/language/types/string.xml:1.12 phpdoc/en/language/types/string.xml:1.13
--- phpdoc/en/language/types/string.xml:1.12 Thu Jul 31 08:59:19 2008
+++ phpdoc/en/language/types/string.xml Tue Aug 19 22:54:03 2008
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision: 1.12 $ -->
+<!-- $Revision: 1.13 $ -->
<sect1 xml:id="language.types.string">
<title>Strings</title>
@@ -297,8 +297,28 @@
<![CDATA[
My name is "MyName". I am printing some Foo.
Now, I am printing some Bar2.
-This should print a capital 'A': A]]></screen>
-
+This should print a capital 'A': A]]>
+ </screen>
+
+ <para>
+ Its also possible to use the Heredoc syntax to pass data to function
+ arguments:
+ </para>
+
+ <example>
+ <title>Heredoc in arguments example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+var_dump(array(<<<EOD
+foobar!
+EOD
+));
+?>
+]]>
+ </programlisting>
+ </example>
+
<note>
<para>
Heredoc support was added in PHP 4.
| Navigate in group php.doc.cvs at sever news.php.net | |
| Previous | Next |
| © No Copyright You are free to use Anything |
Site Maintained by PHP Developer
Powered By PHP Consultants |