php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #69012
Patch doc-fix-69012 revision 2019-01-20 17:55 UTC by girgias@php.net

Patch doc-fix-69012 for Strings related Bug #69012

Patch version 2019-01-20 17:55 UTC

Return to Bug #69012 | Download this patch
Patch Revisions:

Developer: girgias@php.net

--- en/reference/strings/functions/echo.xml
+++ en/reference/strings/functions/echo.xml
@@ -85,44 +85,11 @@
 <?php
 echo "Hello World";
 
-echo "This spans
-multiple lines. The newlines will be
-output as well";
-
-echo "This spans\nmultiple lines. The newlines will be\noutput as well.";
-
-echo "Escaping characters is done \"Like this\".";
-
-// You can use variables inside of an echo statement
-$foo = "foobar";
-$bar = "barbaz";
-
-echo "foo is $foo"; // foo is foobar
-
-// You can also use arrays
-$baz = array("value" => "foo");
-
-echo "this is {$baz['value']} !"; // this is foo !
-
-// Using single quotes will print the variable name, not the value
-echo 'foo is $foo'; // foo is $foo
-
-// If you are not using any other characters, you can just echo variables
-echo $foo;          // foobar
-echo $foo,$bar;     // foobarbarbaz
-
 // Strings can either be passed individually as multiple arguments or
 // concatenated together and passed as a single argument
 echo 'This ', 'string ', 'was ', 'made ', 'with multiple parameters.', chr(10);
 echo 'This ' . 'string ' . 'was ' . 'made ' . 'with concatenation.' . "\n";
 
-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 does not behave like a function, the following code is invalid.
 ($some_var) ? echo 'true' : echo 'false';
 
@@ -130,6 +97,7 @@
 ($some_var) ? print 'true' : print 'false'; // print is also a construct, but
                                             // it behaves like a function, so
                                             // it may be used in this context.
+
 echo $some_var ? 'true': 'false'; // changing the statement around
 ?>
 ]]>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 15:01:29 2024 UTC