Skip to content

Commit 46d0549

Browse files
committed
Fix compile globals line number (ignore forward scans)
1 parent cf1d86a commit 46d0549

File tree

3 files changed

+194
-164
lines changed

3 files changed

+194
-164
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
--TEST--
2+
Flexible heredoc lineno: ensure the compiler globals line number is correct
3+
--FILE--
4+
<?php
5+
6+
$heredoc = <<<EOT
7+
hello world
8+
EOT;
9+
10+
$heredoc = <<<EOT
11+
hello world
12+
EOT;
13+
14+
$heredoc = <<<EOT
15+
hello world
16+
EOT;
17+
18+
try {
19+
throw new exception();
20+
} catch (Exception $e) {
21+
var_dump($e->getLine());
22+
}
23+
--EXPECTF--
24+
int(16)

0 commit comments

Comments
 (0)