菜谱项目

simple.test 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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. flags: 0
  19. name: A
  20. extends: Name(
  21. parts: array(
  22. 0: B
  23. )
  24. )
  25. implements: array(
  26. 0: Name(
  27. parts: array(
  28. 0: C
  29. )
  30. )
  31. 1: Name(
  32. parts: array(
  33. 0: D
  34. )
  35. )
  36. )
  37. stmts: array(
  38. 0: Stmt_ClassConst(
  39. flags: 0
  40. consts: array(
  41. 0: Const(
  42. name: A
  43. value: Scalar_String(
  44. value: B
  45. )
  46. )
  47. 1: Const(
  48. name: C
  49. value: Scalar_String(
  50. value: D
  51. )
  52. )
  53. )
  54. )
  55. 1: Stmt_Property(
  56. flags: MODIFIER_PUBLIC (1)
  57. props: array(
  58. 0: Stmt_PropertyProperty(
  59. name: a
  60. default: Scalar_String(
  61. value: b
  62. )
  63. )
  64. 1: Stmt_PropertyProperty(
  65. name: c
  66. default: Scalar_String(
  67. value: d
  68. )
  69. )
  70. )
  71. )
  72. 2: Stmt_Property(
  73. flags: MODIFIER_PROTECTED (2)
  74. props: array(
  75. 0: Stmt_PropertyProperty(
  76. name: e
  77. default: null
  78. )
  79. )
  80. )
  81. 3: Stmt_Property(
  82. flags: MODIFIER_PRIVATE (4)
  83. props: array(
  84. 0: Stmt_PropertyProperty(
  85. name: f
  86. default: null
  87. )
  88. )
  89. )
  90. 4: Stmt_ClassMethod(
  91. flags: MODIFIER_PUBLIC (1)
  92. byRef: false
  93. name: a
  94. params: array(
  95. )
  96. returnType: null
  97. stmts: array(
  98. )
  99. )
  100. 5: Stmt_ClassMethod(
  101. flags: MODIFIER_PUBLIC | MODIFIER_STATIC (9)
  102. byRef: false
  103. name: b
  104. params: array(
  105. 0: Param(
  106. type: null
  107. byRef: false
  108. variadic: false
  109. name: a
  110. default: null
  111. )
  112. )
  113. returnType: null
  114. stmts: array(
  115. )
  116. )
  117. 6: Stmt_ClassMethod(
  118. flags: MODIFIER_PUBLIC | MODIFIER_FINAL (33)
  119. byRef: false
  120. name: c
  121. params: array(
  122. )
  123. returnType: Name(
  124. parts: array(
  125. 0: B
  126. )
  127. )
  128. stmts: array(
  129. )
  130. )
  131. 7: Stmt_ClassMethod(
  132. flags: MODIFIER_PROTECTED (2)
  133. byRef: false
  134. name: d
  135. params: array(
  136. )
  137. returnType: null
  138. stmts: array(
  139. )
  140. )
  141. 8: Stmt_ClassMethod(
  142. flags: MODIFIER_PRIVATE (4)
  143. byRef: false
  144. name: e
  145. params: array(
  146. )
  147. returnType: null
  148. stmts: array(
  149. )
  150. )
  151. )
  152. )
  153. )