mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-12-13 01:27:30 +01:00
294 lines
6.0 KiB
Plaintext
294 lines
6.0 KiB
Plaintext
Encapsed strings
|
|
-----
|
|
<?php
|
|
|
|
"$A";
|
|
"$A->B";
|
|
"$A[B]";
|
|
"$A[0]";
|
|
"$A[1234]";
|
|
"$A[9223372036854775808]";
|
|
"$A[000]";
|
|
"$A[0x0]";
|
|
"$A[0b0]";
|
|
"$A[$B]";
|
|
"{$A}";
|
|
"{$A['B']}";
|
|
"${A}";
|
|
"${A['B']}";
|
|
"${$A}";
|
|
"\{$A}";
|
|
"\{ $A }";
|
|
"\\{$A}";
|
|
"\\{ $A }";
|
|
"{$$A}[B]";
|
|
"$$A[B]";
|
|
"A $B C";
|
|
b"$A";
|
|
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_LNumber(
|
|
value: 0
|
|
)
|
|
)
|
|
)
|
|
)
|
|
4: Scalar_Encapsed(
|
|
parts: array(
|
|
0: Expr_ArrayDimFetch(
|
|
var: Expr_Variable(
|
|
name: A
|
|
)
|
|
dim: Scalar_LNumber(
|
|
value: 1234
|
|
)
|
|
)
|
|
)
|
|
)
|
|
5: Scalar_Encapsed(
|
|
parts: array(
|
|
0: Expr_ArrayDimFetch(
|
|
var: Expr_Variable(
|
|
name: A
|
|
)
|
|
dim: Scalar_String(
|
|
value: 9223372036854775808
|
|
)
|
|
)
|
|
)
|
|
)
|
|
6: Scalar_Encapsed(
|
|
parts: array(
|
|
0: Expr_ArrayDimFetch(
|
|
var: Expr_Variable(
|
|
name: A
|
|
)
|
|
dim: Scalar_String(
|
|
value: 000
|
|
)
|
|
)
|
|
)
|
|
)
|
|
7: Scalar_Encapsed(
|
|
parts: array(
|
|
0: Expr_ArrayDimFetch(
|
|
var: Expr_Variable(
|
|
name: A
|
|
)
|
|
dim: Scalar_String(
|
|
value: 0x0
|
|
)
|
|
)
|
|
)
|
|
)
|
|
8: Scalar_Encapsed(
|
|
parts: array(
|
|
0: Expr_ArrayDimFetch(
|
|
var: Expr_Variable(
|
|
name: A
|
|
)
|
|
dim: Scalar_String(
|
|
value: 0b0
|
|
)
|
|
)
|
|
)
|
|
)
|
|
9: Scalar_Encapsed(
|
|
parts: array(
|
|
0: Expr_ArrayDimFetch(
|
|
var: Expr_Variable(
|
|
name: A
|
|
)
|
|
dim: Expr_Variable(
|
|
name: B
|
|
)
|
|
)
|
|
)
|
|
)
|
|
10: Scalar_Encapsed(
|
|
parts: array(
|
|
0: Expr_Variable(
|
|
name: A
|
|
)
|
|
)
|
|
)
|
|
11: Scalar_Encapsed(
|
|
parts: array(
|
|
0: Expr_ArrayDimFetch(
|
|
var: Expr_Variable(
|
|
name: A
|
|
)
|
|
dim: Scalar_String(
|
|
value: B
|
|
)
|
|
)
|
|
)
|
|
)
|
|
12: Scalar_Encapsed(
|
|
parts: array(
|
|
0: Expr_Variable(
|
|
name: A
|
|
)
|
|
)
|
|
)
|
|
13: Scalar_Encapsed(
|
|
parts: array(
|
|
0: Expr_ArrayDimFetch(
|
|
var: Expr_Variable(
|
|
name: A
|
|
)
|
|
dim: Scalar_String(
|
|
value: B
|
|
)
|
|
)
|
|
)
|
|
)
|
|
14: Scalar_Encapsed(
|
|
parts: array(
|
|
0: Expr_Variable(
|
|
name: Expr_Variable(
|
|
name: A
|
|
)
|
|
)
|
|
)
|
|
)
|
|
15: Scalar_Encapsed(
|
|
parts: array(
|
|
0: Scalar_EncapsedStringPart(
|
|
value: \{
|
|
)
|
|
1: Expr_Variable(
|
|
name: A
|
|
)
|
|
2: Scalar_EncapsedStringPart(
|
|
value: }
|
|
)
|
|
)
|
|
)
|
|
16: Scalar_Encapsed(
|
|
parts: array(
|
|
0: Scalar_EncapsedStringPart(
|
|
value: \{
|
|
)
|
|
1: Expr_Variable(
|
|
name: A
|
|
)
|
|
2: Scalar_EncapsedStringPart(
|
|
value: }
|
|
)
|
|
)
|
|
)
|
|
17: Scalar_Encapsed(
|
|
parts: array(
|
|
0: Scalar_EncapsedStringPart(
|
|
value: \
|
|
)
|
|
1: Expr_Variable(
|
|
name: A
|
|
)
|
|
)
|
|
)
|
|
18: Scalar_Encapsed(
|
|
parts: array(
|
|
0: Scalar_EncapsedStringPart(
|
|
value: \{
|
|
)
|
|
1: Expr_Variable(
|
|
name: A
|
|
)
|
|
2: Scalar_EncapsedStringPart(
|
|
value: }
|
|
)
|
|
)
|
|
)
|
|
19: Scalar_Encapsed(
|
|
parts: array(
|
|
0: Expr_Variable(
|
|
name: Expr_Variable(
|
|
name: A
|
|
)
|
|
)
|
|
1: Scalar_EncapsedStringPart(
|
|
value: [B]
|
|
)
|
|
)
|
|
)
|
|
20: Scalar_Encapsed(
|
|
parts: array(
|
|
0: Scalar_EncapsedStringPart(
|
|
value: $
|
|
)
|
|
1: Expr_ArrayDimFetch(
|
|
var: Expr_Variable(
|
|
name: A
|
|
)
|
|
dim: Scalar_String(
|
|
value: B
|
|
)
|
|
)
|
|
)
|
|
)
|
|
21: Scalar_Encapsed(
|
|
parts: array(
|
|
0: Scalar_EncapsedStringPart(
|
|
value: A
|
|
)
|
|
1: Expr_Variable(
|
|
name: B
|
|
)
|
|
2: Scalar_EncapsedStringPart(
|
|
value: C
|
|
)
|
|
)
|
|
)
|
|
22: Scalar_Encapsed(
|
|
parts: array(
|
|
0: Expr_Variable(
|
|
name: A
|
|
)
|
|
)
|
|
)
|
|
23: Scalar_Encapsed(
|
|
parts: array(
|
|
0: Expr_Variable(
|
|
name: A
|
|
)
|
|
)
|
|
)
|
|
) |