simple.test 3.8 KB

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