summaryrefslogtreecommitdiff
path: root/Zend/tests/flexible-heredoc-nowdoc-lineno.phpt
blob: 8aeddbd10d07c60038661937fbdddad24a9a9d87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--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)