Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 55ff5e733b4e6f2ee6300086567d768ff598633d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
--TEST--
Bug 443037 - Restricted word 'parent' can be used as class name (no error)
--FILE--
<?php
namespace bool
{

    class bool
    {
    }

    interface bool
    {
    }

    trait bool
    {
    }
}

namespace float
{

    class float
    {
    }

    interface float
    {
    }

    trait float
    {
    }
}

namespace int
{

    class int
    {
    }

    interface int
    {
    }

    trait int
    {
    }
}

namespace string
{

    class string
    {
    }

    interface string
    {
    }

    trait string
    {
    }
}

namespace iterable
{

    class iterable
    {
    }

    interface iterable
    {
    }

    trait iterable
    {
    }
}

namespace object
{

    class object
    {
    }

    interface object
    {
    }

    trait object
    {
    }
}

namespace self
{

    class self
    {
    }

    interface self
    {
    }

    trait self
    {
    }
}

namespace parent
{

    class parent
    {
    }

    interface parent
    {
    }

    trait parent
    {
    }
}

namespace void
{

    class void
    {
    }

    interface void
    {
    }

    trait void
    {
    }
}

namespace null
{

    class null
    {
    }

    interface null
    {
    }

    trait null
    {
    }
}

namespace true
{

    class true
    {
    }

    interface true
    {
    }

    trait true
    {
    }
}

namespace false
{

    class false
    {
    }

    interface false
    {
    }

    trait false
    {
    }
}

namespace main\bool
{
}

namespace main\float
{
}

namespace main\int
{
}

namespace main\string
{
}

namespace main\iterable
{
}

namespace main\object
{
}

namespace main\self
{
}

namespace main\parent
{
}

namespace main\void
{
}

namespace main\null
{
}

namespace main\true
{
}

namespace main\false
{
}
?>
--EXPECT--
[line=2, start=16, end=20] Cannot use 'bool' as namespace name as it is a reserved word
[line=5, start=34, end=38] Cannot use 'bool' as class name as it is a reserved word
[line=9, start=66, end=70] Cannot declare type bool because the name is already in use
[line=9, start=66, end=70] Cannot use 'bool' as interface name as it is a reserved word
[line=13, start=94, end=98] Cannot declare type bool because the name is already in use
[line=13, start=94, end=98] Cannot use 'bool' as trait name as it is a reserved word
[line=18, start=124, end=129] Cannot use 'float' as namespace name as it is a reserved word
[line=21, start=143, end=148] Cannot use 'float' as class name as it is a reserved word
[line=25, start=176, end=181] Cannot declare type float because the name is already in use
[line=25, start=176, end=181] Cannot use 'float' as interface name as it is a reserved word
[line=29, start=205, end=210] Cannot declare type float because the name is already in use
[line=29, start=205, end=210] Cannot use 'float' as trait name as it is a reserved word
[line=34, start=236, end=239] Cannot use 'int' as namespace name as it is a reserved word
[line=37, start=253, end=256] Cannot use 'int' as class name as it is a reserved word
[line=41, start=284, end=287] Cannot declare type int because the name is already in use
[line=41, start=284, end=287] Cannot use 'int' as interface name as it is a reserved word
[line=45, start=311, end=314] Cannot declare type int because the name is already in use
[line=45, start=311, end=314] Cannot use 'int' as trait name as it is a reserved word
[line=50, start=340, end=346] Cannot use 'string' as namespace name as it is a reserved word
[line=53, start=360, end=366] Cannot use 'string' as class name as it is a reserved word
[line=57, start=394, end=400] Cannot declare type string because the name is already in use
[line=57, start=394, end=400] Cannot use 'string' as interface name as it is a reserved word
[line=61, start=424, end=430] Cannot declare type string because the name is already in use
[line=61, start=424, end=430] Cannot use 'string' as trait name as it is a reserved word
[line=66, start=456, end=464] Cannot use 'iterable' as namespace name as it is a reserved word
[line=69, start=478, end=486] Cannot use 'iterable' as class name as it is a reserved word
[line=73, start=514, end=522] Cannot declare type iterable because the name is already in use
[line=73, start=514, end=522] Cannot use 'iterable' as interface name as it is a reserved word
[line=77, start=546, end=554] Cannot declare type iterable because the name is already in use
[line=77, start=546, end=554] Cannot use 'iterable' as trait name as it is a reserved word
[line=89, start=634, end=640] Cannot declare type object because the name is already in use
[line=93, start=664, end=670] Cannot declare type object because the name is already in use
[line=98, start=696, end=700] Cannot use 'self' as namespace name as it is a reserved word
[line=101, start=714, end=718] Cannot use 'self' as class name as it is a reserved word
[line=105, start=746, end=750] Cannot declare type self because the name is already in use
[line=105, start=746, end=750] Cannot use 'self' as interface name as it is a reserved word
[line=109, start=774, end=778] Cannot declare type self because the name is already in use
[line=109, start=774, end=778] Cannot use 'self' as trait name as it is a reserved word
[line=114, start=804, end=810] Cannot use 'parent' as namespace name as it is a reserved word
[line=117, start=824, end=830] Cannot use 'parent' as class name as it is a reserved word
[line=121, start=858, end=864] Cannot declare type parent because the name is already in use
[line=121, start=858, end=864] Cannot use 'parent' as interface name as it is a reserved word
[line=125, start=888, end=894] Cannot declare type parent because the name is already in use
[line=125, start=888, end=894] Cannot use 'parent' as trait name as it is a reserved word
[line=130, start=920, end=924] Cannot use 'void' as namespace name as it is a reserved word
[line=133, start=938, end=942] Cannot use 'void' as class name as it is a reserved word
[line=137, start=970, end=974] Cannot declare type void because the name is already in use
[line=137, start=970, end=974] Cannot use 'void' as interface name as it is a reserved word
[line=141, start=998, end=1002] Cannot declare type void because the name is already in use
[line=141, start=998, end=1002] Cannot use 'void' as trait name as it is a reserved word
[line=146, start=1028, end=1032] Cannot use 'null' as namespace name as it is a reserved word
[line=149, start=1046, end=1050] Cannot use 'null' as class name as it is a reserved word
[line=153, start=1078, end=1082] Cannot declare type null because the name is already in use
[line=153, start=1078, end=1082] Cannot use 'null' as interface name as it is a reserved word
[line=157, start=1106, end=1110] Cannot declare type null because the name is already in use
[line=157, start=1106, end=1110] Cannot use 'null' as trait name as it is a reserved word
[line=162, start=1136, end=1140] Cannot use 'true' as namespace name as it is a reserved word
[line=165, start=1154, end=1158] Cannot use 'true' as class name as it is a reserved word
[line=169, start=1186, end=1190] Cannot declare type true because the name is already in use
[line=169, start=1186, end=1190] Cannot use 'true' as interface name as it is a reserved word
[line=173, start=1214, end=1218] Cannot declare type true because the name is already in use
[line=173, start=1214, end=1218] Cannot use 'true' as trait name as it is a reserved word
[line=178, start=1244, end=1249] Cannot use 'false' as namespace name as it is a reserved word
[line=181, start=1263, end=1268] Cannot use 'false' as class name as it is a reserved word
[line=185, start=1296, end=1301] Cannot declare type false because the name is already in use
[line=185, start=1296, end=1301] Cannot use 'false' as interface name as it is a reserved word
[line=189, start=1325, end=1330] Cannot declare type false because the name is already in use
[line=189, start=1325, end=1330] Cannot use 'false' as trait name as it is a reserved word

Back to the top