valdeir2000

Echo

Feb 6th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.91 KB | None | 0 0
  1. <?php
  2.  
  3. $variable = 'ok';
  4.  
  5. /* Não imprime a variável e é necessário o escape */
  6. echo '
  7. This uses the "here document" syntax to output
  8. multiple lines with $variable interpolation. Note
  9. that the here document terminator must appear on a
  10. line with just a semicolon. no extra whitespace!
  11. ';
  12.  
  13. echo PHP_EOL.PHP_EOL.PHP_EOL;
  14.  
  15. /* Imprime a variável e é necessário o escape */
  16. echo "
  17. This uses the \"here document\" syntax to output
  18. multiple lines with $variable interpolation. Note
  19. that the here document terminator must appear on a
  20. line with just a semicolon. no extra whitespace!
  21. ";
  22.  
  23. echo PHP_EOL.PHP_EOL.PHP_EOL;
  24.  
  25. /* Imprime a variável e não é necessário o escape */
  26. echo <<<STACKOVERFLOW
  27. This uses the "here document" syntax to output
  28. multiple lines with $variable interpolation. Note
  29. that the here document terminator must appear on a
  30. line with just a semicolon. no extra whitespace!
  31. STACKOVERFLOW;
Add Comment
Please, Sign In to add comment