xref: /PHP-Parser/test/code/parser/stmt/const.test (revision 23647573)
1Global constants
2-----
3<?php
4
5const A = 0, B = 1.0, C = 'A', D = E;
6-----
7array(
8    0: Stmt_Const(
9        consts: array(
10            0: Const(
11                name: Identifier(
12                    name: A
13                )
14                value: Scalar_Int(
15                    value: 0
16                )
17            )
18            1: Const(
19                name: Identifier(
20                    name: B
21                )
22                value: Scalar_Float(
23                    value: 1
24                )
25            )
26            2: Const(
27                name: Identifier(
28                    name: C
29                )
30                value: Scalar_String(
31                    value: A
32                )
33            )
34            3: Const(
35                name: Identifier(
36                    name: D
37                )
38                value: Expr_ConstFetch(
39                    name: Name(
40                        name: E
41                    )
42                )
43            )
44        )
45    )
46)
47