@@ -23,26 +23,22 @@ final class Helpers
23
23
public const ReIdentifier = '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]* ' ;
24
24
25
25
public const Keywords = [
26
- // built-in types
27
- 'string ' => 1 , 'int ' => 1 , 'float ' => 1 , 'bool ' => 1 , 'array ' => 1 , 'object ' => 1 ,
28
- 'callable ' => 1 , 'iterable ' => 1 , 'void ' => 1 , 'null ' => 1 , 'mixed ' => 1 , 'false ' => 1 ,
29
- 'never ' => 1 , 'true ' => 1 ,
30
-
31
26
// class keywords
32
- 'self ' => 1 , 'parent ' => 1 , 'static ' => 1 ,
27
+ 'bool ' => 1 , 'false ' => 1 , 'float ' => 1 , 'int ' => 1 , 'iterable ' => 1 , 'mixed ' => 1 , 'never ' => 1 , 'null ' => 1 ,
28
+ 'object ' => 1 , 'parent ' => 1 , 'self ' => 1 , 'string ' => 1 , 'true ' => 1 , 'void ' => 1 ,
33
29
34
30
// PHP keywords
35
- 'include ' => 1 , 'include_once ' => 1 , 'eval ' => 1 , 'require ' => 1 , 'require_once ' => 1 , 'or ' => 1 , 'xor ' => 1 ,
36
- 'and ' => 1 , 'instanceof ' => 1 , 'new ' => 1 , 'clone ' => 1 , 'exit ' => 1 , 'if ' => 1 , 'elseif ' => 1 , 'else ' => 1 ,
37
- 'endif ' => 1 , 'echo ' => 1 , 'do ' => 1 , 'while ' => 1 , 'endwhile ' => 1 , 'for ' => 1 , 'endfor ' => 1 , 'foreach ' => 1 ,
38
- 'endforeach ' => 1 , 'declare ' => 1 , 'enddeclare ' => 1 , 'as ' => 1 , 'try ' => 1 , 'catch ' => 1 , 'finally ' => 1 ,
39
- 'throw ' => 1 , 'use ' => 1 , 'insteadof ' => 1 , 'global ' => 1 , 'var ' => 1 , 'unset ' => 1 , 'isset ' => 1 , 'empty ' => 1 ,
40
- 'continue ' => 1 , 'goto ' => 1 , 'function ' => 1 , 'const ' => 1 , 'return ' => 1 , 'print ' => 1 , ' yield ' => 1 , ' list ' => 1 ,
41
- 'switch ' => 1 , 'endswitch ' => 1 , 'case ' => 1 , 'default ' => 1 , 'break ' => 1 ,
42
- 'extends ' => 1 , 'implements ' => 1 , 'namespace ' => 1 , 'trait ' => 1 , 'interface ' => 1 , 'class ' => 1 , '__CLASS__ ' => 1 ,
43
- '__TRAIT__ ' => 1 , '__FUNCTION__ ' => 1 , '__METHOD__ ' => 1 , '__LINE__ ' => 1 , '__FILE__ ' => 1 , '__DIR__ ' => 1 ,
44
- '__NAMESPACE__ ' => 1 , 'fn ' => 1 , 'match ' => 1 , 'enum ' => 1 , 'abstract ' => 1 , 'final ' => 1 ,
45
- 'private ' => 1 , 'protected ' => 1 , 'public ' => 1 , 'readonly ' => 1 ,
31
+ '__halt_compiler ' => 1 , 'abstract ' => 1 , 'and ' => 1 , 'array ' => 1 , 'as ' => 1 , 'break ' => 1 , 'callable ' => 1 ,
32
+ 'case ' => 1 , 'catch ' => 1 , 'class ' => 1 , 'clone ' => 1 , 'const ' => 1 , 'continue ' => 1 , 'declare ' => 1 , 'default ' => 1 ,
33
+ 'die ' => 1 , 'do ' => 1 , 'echo ' => 1 , 'else ' => 1 , 'elseif ' => 1 , 'empty ' => 1 , 'enddeclare ' => 1 , 'endfor ' => 1 ,
34
+ 'endforeach ' => 1 , 'endif ' => 1 , 'endswitch ' => 1 , 'endwhile ' => 1 , 'eval ' => 1 , 'exit ' => 1 , 'extends ' => 1 ,
35
+ 'final ' => 1 , 'finally ' => 1 , 'fn ' => 1 , 'for ' => 1 , 'foreach ' => 1 , 'function ' => 1 , 'global ' => 1 , 'goto ' => 1 ,
36
+ 'if ' => 1 , 'implements ' => 1 , 'include ' => 1 , 'include_once ' => 1 , 'instanceof ' => 1 , 'insteadof ' => 1 ,
37
+ 'interface ' => 1 , 'isset ' => 1 , 'list ' => 1 , 'match ' => 1 , 'namespace ' => 1 , ' new ' => 1 , ' or ' => 1 , ' print ' => 1 ,
38
+ 'private ' => 1 , 'protected ' => 1 , 'public ' => 1 , 'readonly ' => 1 , 'require ' => 1 , 'require_once ' => 1 , 'return ' => 1 ,
39
+ 'static ' => 1 , 'switch ' => 1 , 'throw ' => 1 , 'trait ' => 1 , 'try ' => 1 , 'unset ' => 1 , ' use ' => 1 , ' var ' => 1 ,
40
+ 'while ' => 1 , 'xor ' => 1 , 'yield ' => 1 , '__CLASS__ ' => 1 , '__DIR__ ' => 1 , '__FILE__ ' => 1 , ' __FUNCTION__ ' => 1 ,
41
+ '__LINE__ ' => 1 , '__METHOD__ ' => 1 , '__NAMESPACE__ ' => 1 , '__PROPERTY__ ' => 1 , ' __TRAIT__ ' => 1 ,
46
42
];
47
43
48
44
/** @deprecated */
0 commit comments