php-8.0.30-src/Zend/tests/flexible-heredoc-nowdoc-lin...

31 lines
359 B
PHP

--TEST--
Flexible heredoc lineno: ensure the compiler globals line number is correct
--FILE--
<?php
$heredoc = <<<EOT
hello world
EOT;
$heredoc = <<<'EOT'
hello world
EOT;
$heredoc = <<<EOT
hello world
EOT;
$heredoc = <<<'EOT'
hello world
EOT;
try {
throw new exception();
} catch (Exception $e) {
var_dump($e->getLine());
}
?>
--EXPECT--
int(20)