mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
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:
parent
ff3c03e4be
commit
3e99f84597
1 changed files with 23 additions and 3 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue