flexible-heredoc-complex-test2.phpt 332 B

123456789101112131415161718192021222324252627
  1. --TEST--
  2. Flexible heredoc syntax complex test 2: interpolated nested heredocs
  3. with the same delimiter name
  4. --FILE--
  5. <?php
  6. $a = 'b';
  7. ${"b\nb\n d"} = 'b';
  8. var_dump(<<<DOC1
  9. a
  10. ${<<<DOC1
  11. b
  12. ${<<<DOC1
  13. a
  14. DOC1}
  15. d
  16. DOC1
  17. }
  18. c
  19. DOC1);
  20. ?>
  21. --EXPECT--
  22. string(5) "a
  23. b
  24. c"