docString.test 995 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. Nowdoc and heredoc strings
  2. -----
  3. <?php
  4. // empty strings
  5. <<<'EOS'
  6. EOS;
  7. <<<EOS
  8. EOS;
  9. // constant encapsed strings
  10. <<<'EOS'
  11. Test '" $a \n
  12. EOS;
  13. <<<EOS
  14. Test '" \$a \n
  15. EOS;
  16. // encapsed strings
  17. <<<EOS
  18. Test $a
  19. EOS;
  20. <<<EOS
  21. Test $a and $b->c test
  22. EOS;
  23. // comment to force line break before EOF
  24. -----
  25. array(
  26. 0: Scalar_String(
  27. value:
  28. )
  29. 1: Scalar_String(
  30. value:
  31. )
  32. 2: Scalar_String(
  33. value: Test '" $a \n
  34. )
  35. 3: Scalar_String(
  36. value: Test '" $a
  37. )
  38. 4: Scalar_Encapsed(
  39. parts: array(
  40. 0: Test
  41. 1: Expr_Variable(
  42. name: a
  43. )
  44. )
  45. )
  46. 5: Scalar_Encapsed(
  47. parts: array(
  48. 0: Test
  49. 1: Expr_Variable(
  50. name: a
  51. )
  52. 2: and
  53. 3: Expr_PropertyFetch(
  54. var: Expr_Variable(
  55. name: b
  56. )
  57. name: c
  58. )
  59. 4: test
  60. )
  61. )
  62. )