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