1--TEST--
2Test semi-reserved words as static class properties
3--FILE--
4<?php
5
6class Obj
7{
8    static $empty = 'empty';
9    static $callable = 'callable';
10    static $class = 'class';
11    static $trait = 'trait';
12    static $extends = 'extends';
13    static $implements = 'implements';
14    static $static = 'static';
15    static $abstract = 'abstract';
16    static $final = 'final';
17    static $public = 'public';
18    static $protected = 'protected';
19    static $private = 'private';
20    static $const = 'const';
21    static $enddeclare = 'enddeclare';
22    static $endfor = 'endfor';
23    static $endforeach = 'endforeach';
24    static $endif = 'endif';
25    static $endwhile = 'endwhile';
26    static $and = 'and';
27    static $global = 'global';
28    static $goto = 'goto';
29    static $instanceof = 'instanceof';
30    static $insteadof = 'insteadof';
31    static $interface = 'interface';
32    static $namespace = 'namespace';
33    static $new = 'new';
34    static $or = 'or';
35    static $xor = 'xor';
36    static $try = 'try';
37    static $use = 'use';
38    static $var = 'var';
39    static $exit = 'exit';
40    static $list = 'list';
41    static $clone = 'clone';
42    static $include = 'include';
43    static $include_once = 'include_once';
44    static $throw = 'throw';
45    static $array = 'array';
46    static $print = 'print';
47    static $echo = 'echo';
48    static $require = 'require';
49    static $require_once = 'require_once';
50    static $return = 'return';
51    static $else = 'else';
52    static $elseif = 'elseif';
53    static $default = 'default';
54    static $break = 'break';
55    static $continue = 'continue';
56    static $switch = 'switch';
57    static $yield = 'yield';
58    static $function = 'function';
59    static $if = 'if';
60    static $endswitch = 'endswitch';
61    static $finally = 'finally';
62    static $for = 'for';
63    static $foreach = 'foreach';
64    static $declare = 'declare';
65    static $case = 'case';
66    static $do = 'do';
67    static $while = 'while';
68    static $as = 'as';
69    static $catch = 'catch';
70    static $die = 'die';
71    static $self = 'self';
72    static $parent = 'parent';
73    static $isset = 'isset';
74    static $unset = 'unset';
75    static $__CLASS__ = '__CLASS__';
76    static $__TRAIT__ = '__TRAIT__';
77    static $__FUNCTION__ = '__FUNCTION__';
78    static $__METHOD__ = '__METHOD__';
79    static $__LINE__ = '__LINE__';
80    static $__FILE__ = '__FILE__';
81    static $__DIR__ = '__DIR__';
82    static $__NAMESPACE__ = '__NAMESPACE__';
83    static $__halt_compiler = '__halt_compiler';
84}
85
86echo Obj::$empty, PHP_EOL;
87echo Obj::$callable, PHP_EOL;
88echo Obj::$class, PHP_EOL;
89echo Obj::$trait, PHP_EOL;
90echo Obj::$extends, PHP_EOL;
91echo Obj::$implements, PHP_EOL;
92echo Obj::$static, PHP_EOL;
93echo Obj::$abstract, PHP_EOL;
94echo Obj::$final, PHP_EOL;
95echo Obj::$public, PHP_EOL;
96echo Obj::$protected, PHP_EOL;
97echo Obj::$private, PHP_EOL;
98echo Obj::$const, PHP_EOL;
99echo Obj::$enddeclare, PHP_EOL;
100echo Obj::$endfor, PHP_EOL;
101echo Obj::$endforeach, PHP_EOL;
102echo Obj::$endif, PHP_EOL;
103echo Obj::$endwhile, PHP_EOL;
104echo Obj::$and, PHP_EOL;
105echo Obj::$global, PHP_EOL;
106echo Obj::$goto, PHP_EOL;
107echo Obj::$instanceof, PHP_EOL;
108echo Obj::$insteadof, PHP_EOL;
109echo Obj::$interface, PHP_EOL;
110echo Obj::$namespace, PHP_EOL;
111echo Obj::$new, PHP_EOL;
112echo Obj::$or, PHP_EOL;
113echo Obj::$xor, PHP_EOL;
114echo Obj::$try, PHP_EOL;
115echo Obj::$use, PHP_EOL;
116echo Obj::$var, PHP_EOL;
117echo Obj::$exit, PHP_EOL;
118echo Obj::$list, PHP_EOL;
119echo Obj::$clone, PHP_EOL;
120echo Obj::$include, PHP_EOL;
121echo Obj::$include_once, PHP_EOL;
122echo Obj::$throw, PHP_EOL;
123echo Obj::$array, PHP_EOL;
124echo Obj::$print, PHP_EOL;
125echo Obj::$echo, PHP_EOL;
126echo Obj::$require, PHP_EOL;
127echo Obj::$require_once, PHP_EOL;
128echo Obj::$return, PHP_EOL;
129echo Obj::$else, PHP_EOL;
130echo Obj::$elseif, PHP_EOL;
131echo Obj::$default, PHP_EOL;
132echo Obj::$break, PHP_EOL;
133echo Obj::$continue, PHP_EOL;
134echo Obj::$switch, PHP_EOL;
135echo Obj::$yield, PHP_EOL;
136echo Obj::$function, PHP_EOL;
137echo Obj::$if, PHP_EOL;
138echo Obj::$endswitch, PHP_EOL;
139echo Obj::$finally, PHP_EOL;
140echo Obj::$for, PHP_EOL;
141echo Obj::$foreach, PHP_EOL;
142echo Obj::$declare, PHP_EOL;
143echo Obj::$case, PHP_EOL;
144echo Obj::$do, PHP_EOL;
145echo Obj::$while, PHP_EOL;
146echo Obj::$as, PHP_EOL;
147echo Obj::$catch, PHP_EOL;
148echo Obj::$die, PHP_EOL;
149echo Obj::$self, PHP_EOL;
150echo Obj::$parent, PHP_EOL;
151echo Obj::$isset, PHP_EOL;
152echo Obj::$unset, PHP_EOL;
153echo Obj::$__CLASS__, PHP_EOL;
154echo Obj::$__TRAIT__, PHP_EOL;
155echo Obj::$__FUNCTION__, PHP_EOL;
156echo Obj::$__METHOD__, PHP_EOL;
157echo Obj::$__LINE__, PHP_EOL;
158echo Obj::$__FILE__, PHP_EOL;
159echo Obj::$__DIR__, PHP_EOL;
160echo Obj::$__NAMESPACE__, PHP_EOL;
161echo Obj::$__halt_compiler, PHP_EOL;
162
163echo "\nDone\n";
164
165--EXPECTF--
166empty
167callable
168class
169trait
170extends
171implements
172static
173abstract
174final
175public
176protected
177private
178const
179enddeclare
180endfor
181endforeach
182endif
183endwhile
184and
185global
186goto
187instanceof
188insteadof
189interface
190namespace
191new
192or
193xor
194try
195use
196var
197exit
198list
199clone
200include
201include_once
202throw
203array
204print
205echo
206require
207require_once
208return
209else
210elseif
211default
212break
213continue
214switch
215yield
216function
217if
218endswitch
219finally
220for
221foreach
222declare
223case
224do
225while
226as
227catch
228die
229self
230parent
231isset
232unset
233__CLASS__
234__TRAIT__
235__FUNCTION__
236__METHOD__
237__LINE__
238__FILE__
239__DIR__
240__NAMESPACE__
241__halt_compiler
242
243Done
244