菜谱项目

funcCall.test 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. Function calls
  2. -----
  3. <?php
  4. // function name variations
  5. a();
  6. $a();
  7. ${'a'}();
  8. $$a();
  9. $$$a();
  10. $a['b']();
  11. $a{'b'}();
  12. $a->b['c']();
  13. // array dereferencing
  14. a()['b'];
  15. -----
  16. array(
  17. 0: Expr_FuncCall(
  18. name: Name(
  19. parts: array(
  20. 0: a
  21. )
  22. comments: array(
  23. 0: // function name variations
  24. )
  25. )
  26. args: array(
  27. )
  28. comments: array(
  29. 0: // function name variations
  30. )
  31. )
  32. 1: Expr_FuncCall(
  33. name: Expr_Variable(
  34. name: a
  35. )
  36. args: array(
  37. )
  38. )
  39. 2: Expr_FuncCall(
  40. name: Expr_Variable(
  41. name: Scalar_String(
  42. value: a
  43. )
  44. )
  45. args: array(
  46. )
  47. )
  48. 3: Expr_FuncCall(
  49. name: Expr_Variable(
  50. name: Expr_Variable(
  51. name: a
  52. )
  53. )
  54. args: array(
  55. )
  56. )
  57. 4: Expr_FuncCall(
  58. name: Expr_Variable(
  59. name: Expr_Variable(
  60. name: Expr_Variable(
  61. name: a
  62. )
  63. )
  64. )
  65. args: array(
  66. )
  67. )
  68. 5: Expr_FuncCall(
  69. name: Expr_ArrayDimFetch(
  70. var: Expr_Variable(
  71. name: a
  72. )
  73. dim: Scalar_String(
  74. value: b
  75. )
  76. )
  77. args: array(
  78. )
  79. )
  80. 6: Expr_FuncCall(
  81. name: Expr_ArrayDimFetch(
  82. var: Expr_Variable(
  83. name: a
  84. )
  85. dim: Scalar_String(
  86. value: b
  87. )
  88. )
  89. args: array(
  90. )
  91. )
  92. 7: Expr_FuncCall(
  93. name: Expr_ArrayDimFetch(
  94. var: Expr_PropertyFetch(
  95. var: Expr_Variable(
  96. name: a
  97. )
  98. name: b
  99. )
  100. dim: Scalar_String(
  101. value: c
  102. )
  103. )
  104. args: array(
  105. )
  106. )
  107. 8: Expr_ArrayDimFetch(
  108. var: Expr_FuncCall(
  109. name: Name(
  110. parts: array(
  111. 0: a
  112. )
  113. comments: array(
  114. 0: // array dereferencing
  115. )
  116. )
  117. args: array(
  118. )
  119. comments: array(
  120. 0: // array dereferencing
  121. )
  122. )
  123. dim: Scalar_String(
  124. value: b
  125. )
  126. comments: array(
  127. 0: // array dereferencing
  128. )
  129. )
  130. )