simple.test 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. Class declaration
  2. -----
  3. <?php
  4. class A extends B implements C, D {
  5. const A = 'B', C = 'D';
  6. public $a = 'b', $c = 'd';
  7. protected $e;
  8. private $f;
  9. public function a() {}
  10. public static function b($a) {}
  11. public final function c() : B {}
  12. protected function d() {}
  13. private function e() {}
  14. }
  15. -----
  16. array(
  17. 0: Stmt_Class(
  18. attrGroups: array(
  19. )
  20. flags: 0
  21. name: Identifier(
  22. name: A
  23. )
  24. extends: Name(
  25. parts: array(
  26. 0: B
  27. )
  28. )
  29. implements: array(
  30. 0: Name(
  31. parts: array(
  32. 0: C
  33. )
  34. )
  35. 1: Name(
  36. parts: array(
  37. 0: D
  38. )
  39. )
  40. )
  41. stmts: array(
  42. 0: Stmt_ClassConst(
  43. attrGroups: array(
  44. )
  45. flags: 0
  46. type: null
  47. consts: array(
  48. 0: Const(
  49. name: Identifier(
  50. name: A
  51. )
  52. value: Scalar_String(
  53. value: B
  54. )
  55. )
  56. 1: Const(
  57. name: Identifier(
  58. name: C
  59. )
  60. value: Scalar_String(
  61. value: D
  62. )
  63. )
  64. )
  65. )
  66. 1: Stmt_Property(
  67. attrGroups: array(
  68. )
  69. flags: MODIFIER_PUBLIC (1)
  70. type: null
  71. props: array(
  72. 0: Stmt_PropertyProperty(
  73. name: VarLikeIdentifier(
  74. name: a
  75. )
  76. default: Scalar_String(
  77. value: b
  78. )
  79. )
  80. 1: Stmt_PropertyProperty(
  81. name: VarLikeIdentifier(
  82. name: c
  83. )
  84. default: Scalar_String(
  85. value: d
  86. )
  87. )
  88. )
  89. )
  90. 2: Stmt_Property(
  91. attrGroups: array(
  92. )
  93. flags: MODIFIER_PROTECTED (2)
  94. type: null
  95. props: array(
  96. 0: Stmt_PropertyProperty(
  97. name: VarLikeIdentifier(
  98. name: e
  99. )
  100. default: null
  101. )
  102. )
  103. )
  104. 3: Stmt_Property(
  105. attrGroups: array(
  106. )
  107. flags: MODIFIER_PRIVATE (4)
  108. type: null
  109. props: array(
  110. 0: Stmt_PropertyProperty(
  111. name: VarLikeIdentifier(
  112. name: f
  113. )
  114. default: null
  115. )
  116. )
  117. )
  118. 4: Stmt_ClassMethod(
  119. attrGroups: array(
  120. )
  121. flags: MODIFIER_PUBLIC (1)
  122. byRef: false
  123. name: Identifier(
  124. name: a
  125. )
  126. params: array(
  127. )
  128. returnType: null
  129. stmts: array(
  130. )
  131. )
  132. 5: Stmt_ClassMethod(
  133. attrGroups: array(
  134. )
  135. flags: MODIFIER_PUBLIC | MODIFIER_STATIC (9)
  136. byRef: false
  137. name: Identifier(
  138. name: b
  139. )
  140. params: array(
  141. 0: Param(
  142. attrGroups: array(
  143. )
  144. flags: 0
  145. type: null
  146. byRef: false
  147. variadic: false
  148. var: Expr_Variable(
  149. name: a
  150. )
  151. default: null
  152. )
  153. )
  154. returnType: null
  155. stmts: array(
  156. )
  157. )
  158. 6: Stmt_ClassMethod(
  159. attrGroups: array(
  160. )
  161. flags: MODIFIER_PUBLIC | MODIFIER_FINAL (33)
  162. byRef: false
  163. name: Identifier(
  164. name: c
  165. )
  166. params: array(
  167. )
  168. returnType: Name(
  169. parts: array(
  170. 0: B
  171. )
  172. )
  173. stmts: array(
  174. )
  175. )
  176. 7: Stmt_ClassMethod(
  177. attrGroups: array(
  178. )
  179. flags: MODIFIER_PROTECTED (2)
  180. byRef: false
  181. name: Identifier(
  182. name: d
  183. )
  184. params: array(
  185. )
  186. returnType: null
  187. stmts: array(
  188. )
  189. )
  190. 8: Stmt_ClassMethod(
  191. attrGroups: array(
  192. )
  193. flags: MODIFIER_PRIVATE (4)
  194. byRef: false
  195. name: Identifier(
  196. name: e
  197. )
  198. params: array(
  199. )
  200. returnType: null
  201. stmts: array(
  202. )
  203. )
  204. )
  205. )
  206. )