flexible-heredoc-nowdoc-lineno.phpt 359 B

123456789101112131415161718192021222324252627282930
  1. --TEST--
  2. Flexible heredoc lineno: ensure the compiler globals line number is correct
  3. --FILE--
  4. <?php
  5. $heredoc = <<<EOT
  6. hello world
  7. EOT;
  8. $heredoc = <<<'EOT'
  9. hello world
  10. EOT;
  11. $heredoc = <<<EOT
  12. hello world
  13. EOT;
  14. $heredoc = <<<'EOT'
  15. hello world
  16. EOT;
  17. try {
  18. throw new exception();
  19. } catch (Exception $e) {
  20. var_dump($e->getLine());
  21. }
  22. ?>
  23. --EXPECT--
  24. int(20)