staticPropertyFetch.test 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. Static property fetches
  2. -----
  3. <?php
  4. // property name variations
  5. A::$b;
  6. A::$$b;
  7. A::${'b'};
  8. // array access
  9. A::$b['c'];
  10. A::$b{'c'};
  11. // class name variations can be found in staticCall.test
  12. -----
  13. array(
  14. 0: Expr_StaticPropertyFetch(
  15. class: Name(
  16. parts: array(
  17. 0: A
  18. )
  19. )
  20. name: b
  21. )
  22. 1: Expr_StaticPropertyFetch(
  23. class: Name(
  24. parts: array(
  25. 0: A
  26. )
  27. )
  28. name: Expr_Variable(
  29. name: b
  30. )
  31. )
  32. 2: Expr_StaticPropertyFetch(
  33. class: Name(
  34. parts: array(
  35. 0: A
  36. )
  37. )
  38. name: Scalar_String(
  39. value: b
  40. )
  41. )
  42. 3: Expr_ArrayDimFetch(
  43. var: Expr_StaticPropertyFetch(
  44. class: Name(
  45. parts: array(
  46. 0: A
  47. )
  48. )
  49. name: b
  50. )
  51. dim: Scalar_String(
  52. value: c
  53. )
  54. )
  55. 4: Expr_ArrayDimFetch(
  56. var: Expr_StaticPropertyFetch(
  57. class: Name(
  58. parts: array(
  59. 0: A
  60. )
  61. )
  62. name: b
  63. )
  64. dim: Scalar_String(
  65. value: c
  66. )
  67. )
  68. )