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]";
|
2016-12-07 20:22:53 +01:00
|
|
|
"$A[1234]";
|
|
|
|
"$A[9223372036854775808]";
|
|
|
|
"$A[000]";
|
2011-11-26 17:10:18 +01:00
|
|
|
"$A[0x0]";
|
2016-12-07 20:22:53 +01:00
|
|
|
"$A[0b0]";
|
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";
|
2016-04-04 15:07:50 +02:00
|
|
|
B"$A";
|
2011-11-26 17:10:18 +01:00
|
|
|
-----
|
|
|
|
array(
|
2017-01-19 22:25:22 +01:00
|
|
|
0: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_Variable(
|
2011-11-26 17:10:18 +01:00
|
|
|
name: A
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
1: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_PropertyFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
2017-04-28 19:09:39 +02:00
|
|
|
name: Identifier(
|
|
|
|
name: B
|
|
|
|
)
|
2011-11-26 17:10:18 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
2: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_ArrayDimFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
dim: Scalar_String(
|
|
|
|
value: B
|
|
|
|
)
|
2011-11-26 17:10:18 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
3: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_ArrayDimFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
dim: Scalar_LNumber(
|
|
|
|
value: 0
|
|
|
|
)
|
2016-12-07 20:22:53 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
4: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_ArrayDimFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
dim: Scalar_LNumber(
|
|
|
|
value: 1234
|
|
|
|
)
|
2016-12-07 20:22:53 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
5: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_ArrayDimFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
dim: Scalar_String(
|
|
|
|
value: 9223372036854775808
|
|
|
|
)
|
2016-12-07 20:22:53 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
6: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_ArrayDimFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
dim: Scalar_String(
|
|
|
|
value: 000
|
|
|
|
)
|
2011-11-26 17:10:18 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
7: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_ArrayDimFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
dim: Scalar_String(
|
|
|
|
value: 0x0
|
|
|
|
)
|
2016-12-07 20:22:53 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
8: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_ArrayDimFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
dim: Scalar_String(
|
|
|
|
value: 0b0
|
|
|
|
)
|
2011-12-07 18:17:05 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
9: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_ArrayDimFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
dim: Expr_Variable(
|
|
|
|
name: B
|
|
|
|
)
|
|
|
|
)
|
2011-11-26 17:10:18 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
10: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_Variable(
|
2011-11-26 17:10:18 +01:00
|
|
|
name: A
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
11: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_ArrayDimFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
dim: Scalar_String(
|
|
|
|
value: B
|
|
|
|
)
|
|
|
|
)
|
2011-11-26 17:10:18 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
12: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_Variable(
|
2011-11-26 17:10:18 +01:00
|
|
|
name: A
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
13: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_ArrayDimFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
dim: Scalar_String(
|
|
|
|
value: B
|
|
|
|
)
|
2011-11-26 17:10:18 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
14: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_Variable(
|
|
|
|
name: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
)
|
2015-12-03 22:55:07 +01:00
|
|
|
)
|
2015-03-11 19:02:44 +01:00
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
15: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Scalar_EncapsedStringPart(
|
|
|
|
value: \{
|
|
|
|
)
|
|
|
|
1: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
2: Scalar_EncapsedStringPart(
|
|
|
|
value: }
|
|
|
|
)
|
2015-12-03 22:55:07 +01:00
|
|
|
)
|
2015-03-11 19:02:44 +01:00
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
16: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Scalar_EncapsedStringPart(
|
|
|
|
value: \{
|
|
|
|
)
|
|
|
|
1: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
2: Scalar_EncapsedStringPart(
|
|
|
|
value: }
|
|
|
|
)
|
2015-03-11 19:02:44 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
17: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Scalar_EncapsedStringPart(
|
|
|
|
value: \
|
|
|
|
)
|
|
|
|
1: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
2015-12-03 22:55:07 +01:00
|
|
|
)
|
2015-03-11 19:02:44 +01:00
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
18: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Scalar_EncapsedStringPart(
|
|
|
|
value: \{
|
|
|
|
)
|
|
|
|
1: Expr_Variable(
|
2015-03-11 19:02:44 +01:00
|
|
|
name: A
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
2: Scalar_EncapsedStringPart(
|
|
|
|
value: }
|
|
|
|
)
|
2015-12-03 22:55:07 +01:00
|
|
|
)
|
2015-03-11 19:02:44 +01:00
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
19: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_Variable(
|
|
|
|
name: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
2015-03-11 19:02:44 +01:00
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
1: Scalar_EncapsedStringPart(
|
|
|
|
value: [B]
|
2015-03-11 19:02:44 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
20: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Scalar_EncapsedStringPart(
|
|
|
|
value: $
|
|
|
|
)
|
|
|
|
1: Expr_ArrayDimFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
|
|
|
dim: Scalar_String(
|
|
|
|
value: B
|
|
|
|
)
|
|
|
|
)
|
2011-11-26 17:10:18 +01:00
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
21: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Scalar_EncapsedStringPart(
|
|
|
|
value: A
|
|
|
|
)
|
|
|
|
1: Expr_Variable(
|
|
|
|
name: B
|
|
|
|
)
|
|
|
|
2: Scalar_EncapsedStringPart(
|
|
|
|
value: C
|
|
|
|
)
|
2015-12-03 22:55:07 +01:00
|
|
|
)
|
2011-11-26 17:10:18 +01:00
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
22: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
2011-11-26 17:10:18 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
23: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_Variable(
|
|
|
|
name: A
|
|
|
|
)
|
2016-04-04 15:07:50 +02:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2015-12-03 22:55:07 +01:00
|
|
|
)
|