2016-12-11 13:44:17 +01:00
|
|
|
Encapsed string negative var offsets
|
|
|
|
-----
|
|
|
|
<?php
|
|
|
|
"$a[-0]";
|
|
|
|
"$a[-1]";
|
|
|
|
"$a[-0x0]";
|
|
|
|
"$a[-00]";
|
|
|
|
"$a[@@{ -PHP_INT_MAX - 1 }@@]";
|
|
|
|
-----
|
|
|
|
!!php7
|
|
|
|
array(
|
2017-01-19 22:31:29 +01:00
|
|
|
0: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_ArrayDimFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: a
|
|
|
|
)
|
|
|
|
dim: Scalar_String(
|
|
|
|
value: -0
|
|
|
|
)
|
2016-12-11 13:44:17 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:31:29 +01:00
|
|
|
1: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_ArrayDimFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: a
|
|
|
|
)
|
|
|
|
dim: Scalar_LNumber(
|
|
|
|
value: -1
|
|
|
|
)
|
2016-12-11 13:44:17 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:31:29 +01:00
|
|
|
2: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_ArrayDimFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: a
|
|
|
|
)
|
|
|
|
dim: Scalar_String(
|
|
|
|
value: -0x0
|
|
|
|
)
|
2016-12-11 13:44:17 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:31:29 +01:00
|
|
|
3: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_ArrayDimFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: a
|
|
|
|
)
|
|
|
|
dim: Scalar_String(
|
|
|
|
value: -00
|
|
|
|
)
|
2016-12-11 13:44:17 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:31:29 +01:00
|
|
|
4: Stmt_Expression(
|
|
|
|
expr: Scalar_Encapsed(
|
|
|
|
parts: array(
|
|
|
|
0: Expr_ArrayDimFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: a
|
|
|
|
)
|
|
|
|
dim: Scalar_LNumber(
|
|
|
|
value: @@{ -PHP_INT_MAX - 1 }@@
|
|
|
|
)
|
2016-12-11 13:44:17 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|