1--TEST--
2Class properties in AST version 70 (php 7.0+)
3--FILE--
4<?php
5
6require __DIR__ . '/../util.php';
7
8$code = <<<'PHP'
9<?php
10namespace Foo;
11class test {
12    public $i = 2, $j;
13    protected $row;
14    var $o;
15    private static $normal = null;
16}
17PHP;
18
19$node = ast\parse_code($code, $version=70);
20echo ast_dump($node), "\n";
21?>
22--EXPECTF--
23AST_STMT_LIST
24    0: AST_NAMESPACE
25        name: "Foo"
26        stmts: null
27    1: AST_CLASS
28        name: "test"
29        docComment: null
30        extends: null
31        implements: null
32        stmts: AST_STMT_LIST
33            0: AST_PROP_GROUP
34                flags: MODIFIER_PUBLIC (%d)
35                type: null
36                props: AST_PROP_DECL
37                    0: AST_PROP_ELEM
38                        name: "i"
39                        default: 2
40                        docComment: null
41                    1: AST_PROP_ELEM
42                        name: "j"
43                        default: null
44                        docComment: null
45            1: AST_PROP_GROUP
46                flags: MODIFIER_PROTECTED (%d)
47                type: null
48                props: AST_PROP_DECL
49                    0: AST_PROP_ELEM
50                        name: "row"
51                        default: null
52                        docComment: null
53            2: AST_PROP_GROUP
54                flags: MODIFIER_PUBLIC (%d)
55                type: null
56                props: AST_PROP_DECL
57                    0: AST_PROP_ELEM
58                        name: "o"
59                        default: null
60                        docComment: null
61            3: AST_PROP_GROUP
62                flags: MODIFIER_PRIVATE | MODIFIER_STATIC (%d)
63                type: null
64                props: AST_PROP_DECL
65                    0: AST_PROP_ELEM
66                        name: "normal"
67                        default: AST_CONST
68                            name: AST_NAME
69                                flags: NAME_NOT_FQ (1)
70                                name: "null"
71                        docComment: null
72        __declId: 0
73