docStringNewlines.test 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. -----
  13. array(
  14. 0: Stmt_Expression(
  15. expr: Scalar_String(
  16. value:
  17. )
  18. )
  19. 1: Stmt_Expression(
  20. expr: Scalar_String(
  21. value:
  22. )
  23. )
  24. 2: Stmt_Expression(
  25. expr: Scalar_String(
  26. value: Foo
  27. )
  28. )
  29. 3: Stmt_Expression(
  30. expr: Scalar_Encapsed(
  31. parts: array(
  32. 0: Expr_Variable(
  33. name: var
  34. )
  35. 1: Scalar_EncapsedStringPart(
  36. value:
  37. )
  38. )
  39. )
  40. )
  41. 4: Stmt_Expression(
  42. expr: Scalar_String(
  43. value:
  44. )
  45. )
  46. 5: Stmt_Expression(
  47. expr: Scalar_String(
  48. value:
  49. )
  50. )
  51. 6: Stmt_Expression(
  52. expr: Scalar_String(
  53. value: Foo
  54. )
  55. )
  56. 7: Stmt_Expression(
  57. expr: Scalar_Encapsed(
  58. parts: array(
  59. 0: Expr_Variable(
  60. name: var
  61. )
  62. 1: Scalar_EncapsedStringPart(
  63. value:
  64. )
  65. )
  66. )
  67. )
  68. )