simple.test 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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. final public 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. name: B
  26. )
  27. implements: array(
  28. 0: Name(
  29. name: C
  30. )
  31. 1: Name(
  32. name: D
  33. )
  34. )
  35. stmts: array(
  36. 0: Stmt_ClassConst(
  37. attrGroups: array(
  38. )
  39. flags: 0
  40. type: null
  41. consts: array(
  42. 0: Const(
  43. name: Identifier(
  44. name: A
  45. )
  46. value: Scalar_String(
  47. value: B
  48. )
  49. )
  50. 1: Const(
  51. name: Identifier(
  52. name: C
  53. )
  54. value: Scalar_String(
  55. value: D
  56. )
  57. )
  58. )
  59. )
  60. 1: Stmt_Property(
  61. attrGroups: array(
  62. )
  63. flags: PUBLIC (1)
  64. type: null
  65. props: array(
  66. 0: PropertyItem(
  67. name: VarLikeIdentifier(
  68. name: a
  69. )
  70. default: Scalar_String(
  71. value: b
  72. )
  73. )
  74. 1: PropertyItem(
  75. name: VarLikeIdentifier(
  76. name: c
  77. )
  78. default: Scalar_String(
  79. value: d
  80. )
  81. )
  82. )
  83. )
  84. 2: Stmt_Property(
  85. attrGroups: array(
  86. )
  87. flags: PROTECTED (2)
  88. type: null
  89. props: array(
  90. 0: PropertyItem(
  91. name: VarLikeIdentifier(
  92. name: e
  93. )
  94. default: null
  95. )
  96. )
  97. )
  98. 3: Stmt_Property(
  99. attrGroups: array(
  100. )
  101. flags: PRIVATE (4)
  102. type: null
  103. props: array(
  104. 0: PropertyItem(
  105. name: VarLikeIdentifier(
  106. name: f
  107. )
  108. default: null
  109. )
  110. )
  111. )
  112. 4: Stmt_ClassMethod(
  113. attrGroups: array(
  114. )
  115. flags: PUBLIC (1)
  116. byRef: false
  117. name: Identifier(
  118. name: a
  119. )
  120. params: array(
  121. )
  122. returnType: null
  123. stmts: array(
  124. )
  125. )
  126. 5: Stmt_ClassMethod(
  127. attrGroups: array(
  128. )
  129. flags: PUBLIC | STATIC (9)
  130. byRef: false
  131. name: Identifier(
  132. name: b
  133. )
  134. params: array(
  135. 0: Param(
  136. attrGroups: array(
  137. )
  138. flags: 0
  139. type: null
  140. byRef: false
  141. variadic: false
  142. var: Expr_Variable(
  143. name: a
  144. )
  145. default: null
  146. )
  147. )
  148. returnType: null
  149. stmts: array(
  150. )
  151. )
  152. 6: Stmt_ClassMethod(
  153. attrGroups: array(
  154. )
  155. flags: PUBLIC | FINAL (33)
  156. byRef: false
  157. name: Identifier(
  158. name: c
  159. )
  160. params: array(
  161. )
  162. returnType: Name(
  163. name: B
  164. )
  165. stmts: array(
  166. )
  167. )
  168. 7: Stmt_ClassMethod(
  169. attrGroups: array(
  170. )
  171. flags: PROTECTED (2)
  172. byRef: false
  173. name: Identifier(
  174. name: d
  175. )
  176. params: array(
  177. )
  178. returnType: null
  179. stmts: array(
  180. )
  181. )
  182. 8: Stmt_ClassMethod(
  183. attrGroups: array(
  184. )
  185. flags: PRIVATE (4)
  186. byRef: false
  187. name: Identifier(
  188. name: e
  189. )
  190. params: array(
  191. )
  192. returnType: null
  193. stmts: array(
  194. )
  195. )
  196. )
  197. )
  198. )