1Aliases (use)
2-----
3<?php
4
5use A\B;
6use C\D as E;
7use F\G as H, J;
8
9// evil alias notation - Do Not Use!
10use \A;
11use \A as B;
12
13// function and constant aliases
14use function foo\bar;
15use function foo\bar as baz;
16use const foo\BAR;
17use const foo\BAR as BAZ;
18-----
19array(
20    0: Stmt_Use(
21        type: TYPE_NORMAL (1)
22        uses: array(
23            0: UseItem(
24                type: TYPE_UNKNOWN (0)
25                name: Name(
26                    name: A\B
27                )
28                alias: null
29            )
30        )
31    )
32    1: Stmt_Use(
33        type: TYPE_NORMAL (1)
34        uses: array(
35            0: UseItem(
36                type: TYPE_UNKNOWN (0)
37                name: Name(
38                    name: C\D
39                )
40                alias: Identifier(
41                    name: E
42                )
43            )
44        )
45    )
46    2: Stmt_Use(
47        type: TYPE_NORMAL (1)
48        uses: array(
49            0: UseItem(
50                type: TYPE_UNKNOWN (0)
51                name: Name(
52                    name: F\G
53                )
54                alias: Identifier(
55                    name: H
56                )
57            )
58            1: UseItem(
59                type: TYPE_UNKNOWN (0)
60                name: Name(
61                    name: J
62                )
63                alias: null
64            )
65        )
66    )
67    3: Stmt_Use(
68        type: TYPE_NORMAL (1)
69        uses: array(
70            0: UseItem(
71                type: TYPE_UNKNOWN (0)
72                name: Name(
73                    name: A
74                )
75                alias: null
76            )
77        )
78        comments: array(
79            0: // evil alias notation - Do Not Use!
80        )
81    )
82    4: Stmt_Use(
83        type: TYPE_NORMAL (1)
84        uses: array(
85            0: UseItem(
86                type: TYPE_UNKNOWN (0)
87                name: Name(
88                    name: A
89                )
90                alias: Identifier(
91                    name: B
92                )
93            )
94        )
95    )
96    5: Stmt_Use(
97        type: TYPE_FUNCTION (2)
98        uses: array(
99            0: UseItem(
100                type: TYPE_UNKNOWN (0)
101                name: Name(
102                    name: foo\bar
103                )
104                alias: null
105            )
106        )
107        comments: array(
108            0: // function and constant aliases
109        )
110    )
111    6: Stmt_Use(
112        type: TYPE_FUNCTION (2)
113        uses: array(
114            0: UseItem(
115                type: TYPE_UNKNOWN (0)
116                name: Name(
117                    name: foo\bar
118                )
119                alias: Identifier(
120                    name: baz
121                )
122            )
123        )
124    )
125    7: Stmt_Use(
126        type: TYPE_CONSTANT (3)
127        uses: array(
128            0: UseItem(
129                type: TYPE_UNKNOWN (0)
130                name: Name(
131                    name: foo\BAR
132                )
133                alias: null
134            )
135        )
136    )
137    8: Stmt_Use(
138        type: TYPE_CONSTANT (3)
139        uses: array(
140            0: UseItem(
141                type: TYPE_UNKNOWN (0)
142                name: Name(
143                    name: foo\BAR
144                )
145                alias: Identifier(
146                    name: BAZ
147                )
148            )
149        )
150    )
151)
152