123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- Object access
- -----
- <?php
- // property fetch variations
- $a->b;
- $a->b['c'];
- $a->b{'c'};
- // method call variations
- $a->b();
- $a->{'b'}();
- $a->$b();
- $a->$b['c']();
- // array dereferencing
- $a->b()['c'];
- $a->b(){'c'}; // invalid PHP: drop Support?
- -----
- array(
- 0: Expr_PropertyFetch(
- var: Expr_Variable(
- name: a
- )
- name: b
- )
- 1: Expr_ArrayDimFetch(
- var: Expr_PropertyFetch(
- var: Expr_Variable(
- name: a
- )
- name: b
- )
- dim: Scalar_String(
- value: c
- )
- )
- 2: Expr_ArrayDimFetch(
- var: Expr_PropertyFetch(
- var: Expr_Variable(
- name: a
- )
- name: b
- )
- dim: Scalar_String(
- value: c
- )
- )
- 3: Expr_MethodCall(
- var: Expr_Variable(
- name: a
- )
- name: b
- args: array(
- )
- )
- 4: Expr_MethodCall(
- var: Expr_Variable(
- name: a
- )
- name: Scalar_String(
- value: b
- )
- args: array(
- )
- )
- 5: Expr_MethodCall(
- var: Expr_Variable(
- name: a
- )
- name: Expr_Variable(
- name: b
- )
- args: array(
- )
- )
- 6: Expr_MethodCall(
- var: Expr_Variable(
- name: a
- )
- name: Expr_ArrayDimFetch(
- var: Expr_Variable(
- name: b
- )
- dim: Scalar_String(
- value: c
- )
- )
- args: array(
- )
- )
- 7: Expr_ArrayDimFetch(
- var: Expr_MethodCall(
- var: Expr_Variable(
- name: a
- )
- name: b
- args: array(
- )
- )
- dim: Scalar_String(
- value: c
- )
- )
- 8: Expr_ArrayDimFetch(
- var: Expr_MethodCall(
- var: Expr_Variable(
- name: a
- )
- name: b
- args: array(
- )
- )
- dim: Scalar_String(
- value: c
- )
- )
- )
|