name.test 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. Invalid class name
  2. -----
  3. <?php class self {}
  4. -----
  5. Cannot use 'self' as class name as it is reserved from 1:13 to 1:16
  6. array(
  7. 0: Stmt_Class(
  8. attrGroups: array(
  9. )
  10. flags: 0
  11. name: Identifier(
  12. name: self
  13. )
  14. extends: null
  15. implements: array(
  16. )
  17. stmts: array(
  18. )
  19. )
  20. )
  21. -----
  22. <?php class PARENT {}
  23. -----
  24. Cannot use 'PARENT' as class name as it is reserved from 1:13 to 1:18
  25. array(
  26. 0: Stmt_Class(
  27. attrGroups: array(
  28. )
  29. flags: 0
  30. name: Identifier(
  31. name: PARENT
  32. )
  33. extends: null
  34. implements: array(
  35. )
  36. stmts: array(
  37. )
  38. )
  39. )
  40. -----
  41. <?php class static {}
  42. -----
  43. Syntax error, unexpected T_STATIC, expecting T_STRING from 1:13 to 1:18
  44. array(
  45. )
  46. -----
  47. <?php class A extends self {}
  48. -----
  49. Cannot use 'self' as class name as it is reserved from 1:23 to 1:26
  50. array(
  51. 0: Stmt_Class(
  52. attrGroups: array(
  53. )
  54. flags: 0
  55. name: Identifier(
  56. name: A
  57. )
  58. extends: Name(
  59. parts: array(
  60. 0: self
  61. )
  62. )
  63. implements: array(
  64. )
  65. stmts: array(
  66. )
  67. )
  68. )
  69. -----
  70. <?php class A extends PARENT {}
  71. -----
  72. Cannot use 'PARENT' as class name as it is reserved from 1:23 to 1:28
  73. array(
  74. 0: Stmt_Class(
  75. attrGroups: array(
  76. )
  77. flags: 0
  78. name: Identifier(
  79. name: A
  80. )
  81. extends: Name(
  82. parts: array(
  83. 0: PARENT
  84. )
  85. )
  86. implements: array(
  87. )
  88. stmts: array(
  89. )
  90. )
  91. )
  92. -----
  93. <?php class A extends static {}
  94. -----
  95. Cannot use 'static' as class name as it is reserved from 1:23 to 1:28
  96. array(
  97. 0: Stmt_Class(
  98. attrGroups: array(
  99. )
  100. flags: 0
  101. name: Identifier(
  102. name: A
  103. )
  104. extends: Name(
  105. parts: array(
  106. 0: static
  107. )
  108. )
  109. implements: array(
  110. )
  111. stmts: array(
  112. )
  113. )
  114. )
  115. -----
  116. <?php class A implements self {}
  117. -----
  118. Cannot use 'self' as interface name as it is reserved from 1:26 to 1:29
  119. array(
  120. 0: Stmt_Class(
  121. attrGroups: array(
  122. )
  123. flags: 0
  124. name: Identifier(
  125. name: A
  126. )
  127. extends: null
  128. implements: array(
  129. 0: Name(
  130. parts: array(
  131. 0: self
  132. )
  133. )
  134. )
  135. stmts: array(
  136. )
  137. )
  138. )
  139. -----
  140. <?php class A implements PARENT {}
  141. -----
  142. Cannot use 'PARENT' as interface name as it is reserved from 1:26 to 1:31
  143. array(
  144. 0: Stmt_Class(
  145. attrGroups: array(
  146. )
  147. flags: 0
  148. name: Identifier(
  149. name: A
  150. )
  151. extends: null
  152. implements: array(
  153. 0: Name(
  154. parts: array(
  155. 0: PARENT
  156. )
  157. )
  158. )
  159. stmts: array(
  160. )
  161. )
  162. )
  163. -----
  164. <?php class A implements static {}
  165. -----
  166. Cannot use 'static' as interface name as it is reserved from 1:26 to 1:31
  167. array(
  168. 0: Stmt_Class(
  169. attrGroups: array(
  170. )
  171. flags: 0
  172. name: Identifier(
  173. name: A
  174. )
  175. extends: null
  176. implements: array(
  177. 0: Name(
  178. parts: array(
  179. 0: static
  180. )
  181. )
  182. )
  183. stmts: array(
  184. )
  185. )
  186. )
  187. -----
  188. <?php interface self {}
  189. -----
  190. Cannot use 'self' as class name as it is reserved from 1:17 to 1:20
  191. array(
  192. 0: Stmt_Interface(
  193. attrGroups: array(
  194. )
  195. name: Identifier(
  196. name: self
  197. )
  198. extends: array(
  199. )
  200. stmts: array(
  201. )
  202. )
  203. )
  204. -----
  205. <?php interface PARENT {}
  206. -----
  207. Cannot use 'PARENT' as class name as it is reserved from 1:17 to 1:22
  208. array(
  209. 0: Stmt_Interface(
  210. attrGroups: array(
  211. )
  212. name: Identifier(
  213. name: PARENT
  214. )
  215. extends: array(
  216. )
  217. stmts: array(
  218. )
  219. )
  220. )
  221. -----
  222. <?php interface static {}
  223. -----
  224. Syntax error, unexpected T_STATIC, expecting T_STRING from 1:17 to 1:22
  225. array(
  226. )
  227. -----
  228. <?php interface A extends self {}
  229. -----
  230. Cannot use 'self' as interface name as it is reserved from 1:27 to 1:30
  231. array(
  232. 0: Stmt_Interface(
  233. attrGroups: array(
  234. )
  235. name: Identifier(
  236. name: A
  237. )
  238. extends: array(
  239. 0: Name(
  240. parts: array(
  241. 0: self
  242. )
  243. )
  244. )
  245. stmts: array(
  246. )
  247. )
  248. )
  249. -----
  250. <?php interface A extends PARENT {}
  251. -----
  252. Cannot use 'PARENT' as interface name as it is reserved from 1:27 to 1:32
  253. array(
  254. 0: Stmt_Interface(
  255. attrGroups: array(
  256. )
  257. name: Identifier(
  258. name: A
  259. )
  260. extends: array(
  261. 0: Name(
  262. parts: array(
  263. 0: PARENT
  264. )
  265. )
  266. )
  267. stmts: array(
  268. )
  269. )
  270. )
  271. -----
  272. <?php interface A extends static {}
  273. -----
  274. Cannot use 'static' as interface name as it is reserved from 1:27 to 1:32
  275. array(
  276. 0: Stmt_Interface(
  277. attrGroups: array(
  278. )
  279. name: Identifier(
  280. name: A
  281. )
  282. extends: array(
  283. 0: Name(
  284. parts: array(
  285. 0: static
  286. )
  287. )
  288. )
  289. stmts: array(
  290. )
  291. )
  292. )