xref: /php-ast/tests/name_node.phpt (revision 91f59467)
1--TEST--
2Name nodes
3--FILE--
4<?php
5
6require __DIR__ . '/../util.php';
7
8$code = <<<'PHP'
9<?php
10foo();
11\foo();
12('foo')();
13('\foo')();
14PHP;
15
16echo ast_dump(ast\parse_code($code, $version=70)), "\n";
17
18?>
19--EXPECT--
20AST_STMT_LIST
21    0: AST_CALL
22        expr: AST_NAME
23            flags: NAME_NOT_FQ (1)
24            name: "foo"
25        args: AST_ARG_LIST
26    1: AST_CALL
27        expr: AST_NAME
28            flags: NAME_FQ (0)
29            name: "foo"
30        args: AST_ARG_LIST
31    2: AST_CALL
32        expr: AST_NAME
33            flags: NAME_FQ (0)
34            name: "foo"
35        args: AST_ARG_LIST
36    3: AST_CALL
37        expr: AST_NAME
38            flags: NAME_FQ (0)
39            name: "foo"
40        args: AST_ARG_LIST
41