echo <<<ENDThis uses the "here document" syntax to outputmultiple lines with $variable interpolation. Notethat the here document terminator must appear on aline 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';

// However, the following examples will work:($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?>

Veja Também

User Contributed Notes 3 notes

Passing multiple parameters to echo using commas (',')is not exactly identical to using the concatenation operator ('.'). There are two notable differences.

First, concatenation operators have much higher precedence. Referring to http://php.net/operators.precedence, there are many operators with lower precedence than concatenation, so it is a good idea to use the multi-argument form instead of passing concatenated strings.