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--EXPECT--
165empty
166callable
167class
168trait
169extends
170implements
171static
172abstract
173final
174public
175protected
176private
177const
178enddeclare
179endfor
180endforeach
181endif
182endwhile
183and
184global
185goto
186instanceof
187insteadof
188interface
189namespace
190new
191or
192xor
193try
194use
195var
196exit
197list
198clone
199include
200include_once
201throw
202array
203print
204echo
205require
206require_once
207return
208else
209elseif
210default
211break
212continue
213switch
214yield
215function
216if
217endswitch
218finally
219for
220foreach
221declare
222case
223do
224while
225as
226catch
227die
228self
229parent
230isset
231unset
232__CLASS__
233__TRAIT__
234__FUNCTION__
235__METHOD__
236__LINE__
237__FILE__
238__DIR__
239__NAMESPACE__
240__halt_compiler
241
242Done
243