Added example for heredoc in arguments

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@265139 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Kalle Sommer Nielsen 2008-08-19 22:54:03 +00:00
parent ff3c03e4be
commit 3e99f84597

View file

@ -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 @@ EOT;
<![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.