1Invalid class constant modifiers
2-----
3<?php
4class A {
5    static const X = 1;
6}
7-----
8Cannot use 'static' as constant modifier from 3:5 to 3:10
9array(
10    0: Stmt_Class(
11        attrGroups: array(
12        )
13        flags: 0
14        name: Identifier(
15            name: A
16        )
17        extends: null
18        implements: array(
19        )
20        stmts: array(
21            0: Stmt_ClassConst(
22                attrGroups: array(
23                )
24                flags: STATIC (8)
25                type: null
26                consts: array(
27                    0: Const(
28                        name: Identifier(
29                            name: X
30                        )
31                        value: Scalar_Int(
32                            value: 1
33                        )
34                    )
35                )
36            )
37        )
38    )
39)
40-----
41<?php
42class A {
43    abstract const X = 1;
44}
45-----
46Cannot use 'abstract' as constant modifier from 3:5 to 3:12
47array(
48    0: Stmt_Class(
49        attrGroups: array(
50        )
51        flags: 0
52        name: Identifier(
53            name: A
54        )
55        extends: null
56        implements: array(
57        )
58        stmts: array(
59            0: Stmt_ClassConst(
60                attrGroups: array(
61                )
62                flags: ABSTRACT (16)
63                type: null
64                consts: array(
65                    0: Const(
66                        name: Identifier(
67                            name: X
68                        )
69                        value: Scalar_Int(
70                            value: 1
71                        )
72                    )
73                )
74            )
75        )
76    )
77)
78-----
79<?php
80class A {
81    readonly const X = 1;
82}
83-----
84Cannot use 'readonly' as constant modifier from 3:5 to 3:12
85array(
86    0: Stmt_Class(
87        attrGroups: array(
88        )
89        flags: 0
90        name: Identifier(
91            name: A
92        )
93        extends: null
94        implements: array(
95        )
96        stmts: array(
97            0: Stmt_ClassConst(
98                attrGroups: array(
99                )
100                flags: READONLY (64)
101                type: null
102                consts: array(
103                    0: Const(
104                        name: Identifier(
105                            name: X
106                        )
107                        value: Scalar_Int(
108                            value: 1
109                        )
110                    )
111                )
112            )
113        )
114    )
115)
116-----
117<?php
118class A {
119    public public const X = 1;
120}
121-----
122Multiple access type modifiers are not allowed from 3:12 to 3:17
123array(
124    0: Stmt_Class(
125        attrGroups: array(
126        )
127        flags: 0
128        name: Identifier(
129            name: A
130        )
131        extends: null
132        implements: array(
133        )
134        stmts: array(
135            0: Stmt_ClassConst(
136                attrGroups: array(
137                )
138                flags: PUBLIC (1)
139                type: null
140                consts: array(
141                    0: Const(
142                        name: Identifier(
143                            name: X
144                        )
145                        value: Scalar_Int(
146                            value: 1
147                        )
148                    )
149                )
150            )
151        )
152    )
153)
154