mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
echo: add example using here documents
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@64286 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
a6624f2fc5
commit
0ae200c9ee
1 changed files with 8 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.130 $ -->
|
||||
<!-- $Revision: 1.131 $ -->
|
||||
<reference id="ref.strings">
|
||||
<title>String functions</title>
|
||||
<titleabbrev>Strings</titleabbrev>
|
||||
|
@ -558,6 +558,13 @@ echo 'foo is $foo'; // foo is $foo
|
|||
echo $foo; // foobar
|
||||
echo $foo,$bar; // foobarbarbaz
|
||||
|
||||
echo <<<END
|
||||
This uses the "here document" syntax to output
|
||||
multiple lines with $variable interpolation. Note
|
||||
that the here document terminator must appear on a
|
||||
line with just a semicolon no extra whitespace!
|
||||
END;
|
||||
|
||||
// because echo is not a function, following code is invalid.
|
||||
($some_var) ? echo('true'): echo('false');
|
||||
|
||||
|
|
Loading…
Reference in a new issue