1--TEST--
2ast_dump() with AST_DUMP_LINENOS
3--SKIPIF--
4<?php
5if (!extension_loaded("ast")) print "skip";
6?>
7--FILE--
8<?php
9
10require __DIR__ . '/../util.php';
11
12$code = <<<'PHP'
13<?php
14function
15test
16()
17{
18    var_dump(
19        $foo
20    );
21}
22PHP;
23
24$ast = ast\parse_code($code, $version=70);
25echo ast_dump($ast, AST_DUMP_LINENOS);
26
27?>
28--EXPECTF--
29AST_STMT_LIST @ 1
30    0: AST_FUNC_DECL @ 2-9
31        name: "test"
32        docComment: null
33        params: AST_PARAM_LIST @ 4
34        stmts: AST_STMT_LIST @ 5
35            0: AST_CALL @ 6
36                expr: AST_NAME @ 6
37                    flags: NAME_NOT_FQ (%d)
38                    name: "var_dump"
39                args: AST_ARG_LIST @ 7
40                    0: AST_VAR @ 7
41                        name: "foo"
42        returnType: null
43        __declId: 0