@@ -13,22 +13,25 @@ import (
1313// https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/compiler/php/names.cc
1414
1515// Reserved PHP keywords that must be prefixed with something.
16+ //
17+ // Source: https://github.com/protocolbuffers/protobuf/blob/6e393fd79667597aac2bb42511fb30c31ff1611d/src/google/protobuf/compiler/php/names.cc
1618var reservedNames = []string {
1719 "abstract" , "and" , "array" , "as" , "break" ,
1820 "callable" , "case" , "catch" , "class" , "clone" ,
1921 "const" , "continue" , "declare" , "default" , "die" ,
2022 "do" , "echo" , "else" , "elseif" , "empty" ,
2123 "enddeclare" , "endfor" , "endforeach" , "endif" , "endswitch" ,
2224 "endwhile" , "eval" , "exit" , "extends" , "final" ,
23- "for" , "foreach" , "function" , "global" , "goto" ,
24- "if" , "implements" , "include" , "include_once" , "instanceof" ,
25- "insteadof" , "interface" , "isset" , "list" , "namespace" ,
26- "new" , "or" , "print" , "private" , "protected" ,
27- "public" , "require" , "require_once" , "return" , "static" ,
28- "switch" , "throw" , "trait" , "try" , "unset" ,
29- "use" , "var" , "while" , "xor" , "int" ,
30- "float" , "bool" , "string" , "true" , "false" ,
31- "null" , "void" , "iterable" ,
25+ "finally" , "fn" , "for" , "foreach" , "function" ,
26+ "global" , "goto" , "if" , "implements" , "include" ,
27+ "include_once" , "instanceof" , "insteadof" , "interface" , "isset" ,
28+ "list" , "match" , "namespace" , "new" , "or" ,
29+ "parent" , "print" , "private" , "protected" , "public" ,
30+ "readonly" , "require" , "require_once" , "return" , "self" ,
31+ "static" , "switch" , "throw" , "trait" , "try" ,
32+ "unset" , "use" , "var" , "while" , "xor" ,
33+ "yield" , "int" , "float" , "bool" , "string" ,
34+ "true" , "false" , "null" , "void" , "iterable" ,
3235}
3336
3437// ClassNamePrefix calculates class name prefix.
0 commit comments