nowdoc_013.phpt 864 B

12345678910111213141516171819202122232425
  1. --TEST--
  2. Test whitespace following end of nowdoc
  3. --INI--
  4. highlight.string = #DD0000
  5. highlight.comment = #FF8000
  6. highlight.keyword = #007700
  7. highlight.default = #0000BB
  8. highlight.html = #000000
  9. --FILE--
  10. <?php
  11. $code = <<<'EOF'
  12. <?php
  13. $x = <<<'EOT'
  14. some string
  15. EOT
  16. $y = 2;
  17. ?>
  18. EOF;
  19. highlight_string($code);
  20. ?>
  21. --EXPECT--
  22. <code><span style="color: #000000">
  23. <span style="color: #0000BB">&lt;?php<br />&nbsp;&nbsp;$x&nbsp;</span><span style="color: #007700">=&nbsp;&lt;&lt;&lt;'EOT'<br /></span><span style="color: #DD0000">some&nbsp;string&nbsp;&nbsp;&nbsp;&nbsp;<br /></span><span style="color: #007700">EOT<br />&nbsp;&nbsp;</span><span style="color: #0000BB">$y&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span>
  24. </span>
  25. </code>