2011-11-26 17:10:18 +01:00
|
|
|
Encapsed strings
|
|
|
|
-----
|
|
|
|
<?php
|
2011-11-27 11:20:35 +01:00
|
|
|
|
2011-11-26 17:10:18 +01:00
|
|
|
"$A";
|
|
|
|
"$A->B";
|
|
|
|
"$A[B]";
|
|
|
|
"$A[0]";
|
|
|
|
"$A[0x0]";
|
2011-12-07 18:17:05 +01:00
|
|
|
"$A[$B]";
|
2011-11-26 17:10:18 +01:00
|
|
|
"{$A}";
|
|
|
|
"{$A['B']}";
|
|
|
|
"${A}";
|
|
|
|
"${A['B']}";
|
|
|
|
"${$A}";
|
2015-03-11 19:02:44 +01:00
|
|
|
"\{$A}";
|
|
|
|
"\{ $A }";
|
|
|
|
"\\{$A}";
|
|
|
|
"\\{ $A }";
|
|
|
|
"{$$A}[B]";
|
|
|
|
"$$A[B]";
|
2011-11-26 17:10:18 +01:00
|
|
|
"A $B C";
|
|
|
|
b"$A";
|
|
|
|
-----
|
|
|
|
array(
|
|
|
|
0: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
1: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_PropertyFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
name: B
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
2: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_ArrayDimFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
dim: Scalar_String(
|
|
|
|
value: B
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
3: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_ArrayDimFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
dim: Scalar_String(
|
|
|
|
value: 0
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
4: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_ArrayDimFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
dim: Scalar_String(
|
|
|
|
value: 0x0
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
5: Scalar_Encapsed(
|
2011-12-07 18:17:05 +01:00
|
|
|
parts: array(
|
|
|
|
0: Expr_ArrayDimFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
dim: Expr_Variable(
|
|
|
|
name: B
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
6: Scalar_Encapsed(
|
2011-11-26 17:10:18 +01:00
|
|
|
parts: array(
|
|
|
|
0: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2011-12-07 18:17:05 +01:00
|
|
|
7: Scalar_Encapsed(
|
2011-11-26 17:10:18 +01:00
|
|
|
parts: array(
|
|
|
|
0: Expr_ArrayDimFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
dim: Scalar_String(
|
|
|
|
value: B
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2011-12-07 18:17:05 +01:00
|
|
|
8: Scalar_Encapsed(
|
2011-11-26 17:10:18 +01:00
|
|
|
parts: array(
|
|
|
|
0: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2011-12-07 18:17:05 +01:00
|
|
|
9: Scalar_Encapsed(
|
2011-11-26 17:10:18 +01:00
|
|
|
parts: array(
|
|
|
|
0: Expr_ArrayDimFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
dim: Scalar_String(
|
|
|
|
value: B
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2011-12-07 18:17:05 +01:00
|
|
|
10: Scalar_Encapsed(
|
2011-11-26 17:10:18 +01:00
|
|
|
parts: array(
|
|
|
|
0: Expr_Variable(
|
|
|
|
name: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2011-12-07 18:17:05 +01:00
|
|
|
11: Scalar_Encapsed(
|
2015-03-11 19:02:44 +01:00
|
|
|
parts: array(
|
|
|
|
0: \{
|
|
|
|
1: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
2: }
|
|
|
|
)
|
|
|
|
)
|
|
|
|
12: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: \{
|
|
|
|
1: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
2: }
|
|
|
|
)
|
|
|
|
)
|
|
|
|
13: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: \
|
|
|
|
1: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
14: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: \{
|
|
|
|
1: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
2: }
|
|
|
|
)
|
|
|
|
)
|
|
|
|
15: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_Variable(
|
|
|
|
name: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
)
|
|
|
|
1: [B]
|
|
|
|
)
|
|
|
|
)
|
|
|
|
16: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: $
|
|
|
|
1: Expr_ArrayDimFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
dim: Scalar_String(
|
|
|
|
value: B
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
17: Scalar_Encapsed(
|
2011-11-26 17:10:18 +01:00
|
|
|
parts: array(
|
|
|
|
0: A
|
|
|
|
1: Expr_Variable(
|
|
|
|
name: B
|
|
|
|
)
|
|
|
|
2: C
|
|
|
|
)
|
|
|
|
)
|
2015-03-11 19:02:44 +01:00
|
|
|
18: Scalar_Encapsed(
|
2011-11-26 17:10:18 +01:00
|
|
|
parts: array(
|
|
|
|
0: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2015-03-11 19:02:44 +01:00
|
|
|
)
|