docStringNewlines.test 932 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. Trailing newlines in doc strings
  2. -----
  3. <?php
  4. <<<'EOF'@@{ "\n\n" }@@EOF;
  5. <<<'EOF'@@{ "\n\n\n" }@@EOF;
  6. <<<'EOF'@@{ "\nFoo\n\n" }@@EOF;
  7. <<<EOF@@{ "\n\$var\n\n" }@@EOF;
  8. <<<'EOF'@@{ "\r\n\r\n" }@@EOF;
  9. <<<'EOF'@@{ "\r\n\r\n\r\n" }@@EOF;
  10. <<<'EOF'@@{ "\r\nFoo\r\n\r\n" }@@EOF;
  11. <<<EOF@@{ "\r\n\$var\r\n\r\n" }@@EOF;
  12. // comment to force line break before EOF
  13. -----
  14. array(
  15. 0: Scalar_String(
  16. value:
  17. )
  18. 1: Scalar_String(
  19. value:
  20. )
  21. 2: Scalar_String(
  22. value: Foo
  23. )
  24. 3: Scalar_Encapsed(
  25. parts: array(
  26. 0: Expr_Variable(
  27. name: var
  28. )
  29. 1:
  30. )
  31. )
  32. 4: Scalar_String(
  33. value:
  34. )
  35. 5: Scalar_String(
  36. value:
  37. )
  38. 6: Scalar_String(
  39. value: Foo
  40. )
  41. 7: Scalar_Encapsed(
  42. parts: array(
  43. 0: Expr_Variable(
  44. name: var
  45. )
  46. 1:
  47. )
  48. )
  49. )