2011-11-27 11:20:35 +01:00
|
|
|
Simple fetches (array, property, constant) and calls
|
|
|
|
-----
|
|
|
|
<?php
|
|
|
|
|
|
|
|
// simple calls
|
|
|
|
$a->b();
|
|
|
|
|
|
|
|
// simple properties
|
|
|
|
$a->b;
|
|
|
|
A::$b;
|
|
|
|
|
|
|
|
// simple array access
|
|
|
|
$a[$b];
|
|
|
|
$a{$b};
|
|
|
|
|
|
|
|
// simple constants
|
|
|
|
A;
|
|
|
|
A::B;
|
|
|
|
-----
|
|
|
|
array(
|
2011-12-04 16:52:43 +01:00
|
|
|
0: Expr_MethodCall(
|
2011-11-27 11:20:35 +01:00
|
|
|
var: Expr_Variable(
|
|
|
|
name: a
|
|
|
|
)
|
|
|
|
name: b
|
|
|
|
args: array(
|
|
|
|
)
|
|
|
|
)
|
2011-12-04 16:52:43 +01:00
|
|
|
1: Expr_PropertyFetch(
|
2011-11-27 11:20:35 +01:00
|
|
|
var: Expr_Variable(
|
|
|
|
name: a
|
|
|
|
)
|
|
|
|
name: b
|
|
|
|
)
|
2011-12-04 16:52:43 +01:00
|
|
|
2: Expr_StaticPropertyFetch(
|
2011-11-27 11:20:35 +01:00
|
|
|
class: Name(
|
|
|
|
parts: array(
|
|
|
|
0: A
|
|
|
|
)
|
|
|
|
)
|
|
|
|
name: b
|
|
|
|
)
|
2011-12-04 16:52:43 +01:00
|
|
|
3: Expr_ArrayDimFetch(
|
2011-11-27 11:20:35 +01:00
|
|
|
var: Expr_Variable(
|
|
|
|
name: a
|
|
|
|
)
|
|
|
|
dim: Expr_Variable(
|
|
|
|
name: b
|
|
|
|
)
|
|
|
|
)
|
2011-12-04 16:52:43 +01:00
|
|
|
4: Expr_ArrayDimFetch(
|
2011-11-27 11:20:35 +01:00
|
|
|
var: Expr_Variable(
|
|
|
|
name: a
|
|
|
|
)
|
|
|
|
dim: Expr_Variable(
|
|
|
|
name: b
|
|
|
|
)
|
|
|
|
)
|
2011-12-04 16:52:43 +01:00
|
|
|
5: Expr_ConstFetch(
|
2011-11-27 11:20:35 +01:00
|
|
|
name: Name(
|
|
|
|
parts: array(
|
|
|
|
0: A
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2011-12-04 16:52:43 +01:00
|
|
|
6: Expr_ClassConstFetch(
|
2011-11-27 11:20:35 +01:00
|
|
|
class: Name(
|
|
|
|
parts: array(
|
|
|
|
0: A
|
|
|
|
)
|
|
|
|
)
|
|
|
|
name: B
|
|
|
|
)
|
|
|
|
)
|