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 if(){ echo __METHOD__, PHP_EOL; } 60 static function endswitch(){ echo __METHOD__, PHP_EOL; } 61 static function finally(){ echo __METHOD__, PHP_EOL; } 62 static function for(){ echo __METHOD__, PHP_EOL; } 63 static function foreach(){ echo __METHOD__, PHP_EOL; } 64 static function declare(){ echo __METHOD__, PHP_EOL; } 65 static function case(){ echo __METHOD__, PHP_EOL; } 66 static function do(){ echo __METHOD__, PHP_EOL; } 67 static function while(){ echo __METHOD__, PHP_EOL; } 68 static function as(){ echo __METHOD__, PHP_EOL; } 69 static function catch(){ echo __METHOD__, PHP_EOL; } 70 static function die(){ echo __METHOD__, PHP_EOL; } 71 static function self(){ echo __METHOD__, PHP_EOL; } 72 static function parent(){ echo __METHOD__, PHP_EOL; } 73 static function isset(){ echo __METHOD__, PHP_EOL; } 74 static function unset(){ echo __METHOD__, PHP_EOL; } 75 static function __CLASS__(){ echo __METHOD__, PHP_EOL; } 76 static function __TRAIT__(){ echo __METHOD__, PHP_EOL; } 77 static function __FUNCTION__(){ echo __METHOD__, PHP_EOL; } 78 static function __METHOD__(){ echo __METHOD__, PHP_EOL; } 79 static function __LINE__(){ echo __METHOD__, PHP_EOL; } 80 static function __FILE__(){ echo __METHOD__, PHP_EOL; } 81 static function __DIR__(){ echo __METHOD__, PHP_EOL; } 82 static function __NAMESPACE__(){ echo __METHOD__, PHP_EOL; } 83} 84 85Obj::empty(); 86Obj::callable(); 87Obj::class(); 88Obj::trait(); 89Obj::extends(); 90Obj::implements(); 91Obj::static(); 92Obj::abstract(); 93Obj::final(); 94Obj::public(); 95Obj::protected(); 96Obj::private(); 97Obj::const(); 98Obj::enddeclare(); 99Obj::endfor(); 100Obj::endforeach(); 101Obj::endif(); 102Obj::endwhile(); 103Obj::and(); 104Obj::global(); 105Obj::goto(); 106Obj::instanceof(); 107Obj::insteadof(); 108Obj::interface(); 109Obj::namespace(); 110Obj::new(); 111Obj::or(); 112Obj::xor(); 113Obj::try(); 114Obj::use(); 115Obj::var(); 116Obj::exit(); 117Obj::list(); 118Obj::clone(); 119Obj::include(); 120Obj::include_once(); 121Obj::throw(); 122Obj::array(); 123Obj::print(); 124Obj::echo(); 125Obj::require(); 126Obj::require_once(); 127Obj::return(); 128Obj::else(); 129Obj::elseif(); 130Obj::default(); 131Obj::break(); 132Obj::continue(); 133Obj::switch(); 134Obj::yield(); 135Obj::function(); 136Obj::if(); 137Obj::endswitch(); 138Obj::finally(); 139Obj::for(); 140Obj::foreach(); 141Obj::declare(); 142Obj::case(); 143Obj::do(); 144Obj::while(); 145Obj::as(); 146Obj::catch(); 147Obj::die(); 148Obj::self(); 149Obj::parent(); 150Obj::isset(); 151Obj::unset(); 152Obj::__CLASS__(); 153Obj::__TRAIT__(); 154Obj::__FUNCTION__(); 155Obj::__METHOD__(); 156Obj::__LINE__(); 157Obj::__FILE__(); 158Obj::__DIR__(); 159Obj::__NAMESPACE__(); 160 161echo "\nDone\n"; 162--EXPECTF-- 163Obj::empty 164Obj::callable 165Obj::class 166Obj::trait 167Obj::extends 168Obj::implements 169Obj::static 170Obj::abstract 171Obj::final 172Obj::public 173Obj::protected 174Obj::private 175Obj::const 176Obj::enddeclare 177Obj::endfor 178Obj::endforeach 179Obj::endif 180Obj::endwhile 181Obj::and 182Obj::global 183Obj::goto 184Obj::instanceof 185Obj::insteadof 186Obj::interface 187Obj::namespace 188Obj::new 189Obj::or 190Obj::xor 191Obj::try 192Obj::use 193Obj::var 194Obj::exit 195Obj::list 196Obj::clone 197Obj::include 198Obj::include_once 199Obj::throw 200Obj::array 201Obj::print 202Obj::echo 203Obj::require 204Obj::require_once 205Obj::return 206Obj::else 207Obj::elseif 208Obj::default 209Obj::break 210Obj::continue 211Obj::switch 212Obj::yield 213Obj::function 214Obj::if 215Obj::endswitch 216Obj::finally 217Obj::for 218Obj::foreach 219Obj::declare 220Obj::case 221Obj::do 222Obj::while 223Obj::as 224Obj::catch 225Obj::die 226Obj::self 227Obj::parent 228Obj::isset 229Obj::unset 230Obj::__CLASS__ 231Obj::__TRAIT__ 232Obj::__FUNCTION__ 233Obj::__METHOD__ 234Obj::__LINE__ 235Obj::__FILE__ 236Obj::__DIR__ 237Obj::__NAMESPACE__ 238 239Done 240