2011-12-04 16:52:43 +01:00
|
|
|
New
|
|
|
|
-----
|
|
|
|
<?php
|
|
|
|
|
|
|
|
new A;
|
|
|
|
new A($b);
|
|
|
|
|
|
|
|
// class name variations
|
|
|
|
new $a();
|
|
|
|
new $a['b']();
|
|
|
|
new A::$b();
|
|
|
|
// DNCR object access
|
|
|
|
new $a->b();
|
|
|
|
new $a->b->c();
|
|
|
|
new $a->b['c']();
|
|
|
|
new $a->b{'c'}();
|
|
|
|
|
2012-10-19 14:54:56 +02:00
|
|
|
// test regression introduces by new dereferencing syntax
|
2012-05-12 14:02:35 +02:00
|
|
|
(new A);
|
2011-12-04 16:52:43 +01:00
|
|
|
-----
|
|
|
|
array(
|
2017-01-19 22:25:22 +01:00
|
|
|
0: Stmt_Expression(
|
|
|
|
expr: Expr_New(
|
|
|
|
class: Name(
|
|
|
|
parts: array(
|
|
|
|
0: A
|
|
|
|
)
|
|
|
|
)
|
|
|
|
args: array(
|
2011-12-04 16:52:43 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
1: Stmt_Expression(
|
|
|
|
expr: Expr_New(
|
|
|
|
class: Name(
|
|
|
|
parts: array(
|
|
|
|
0: A
|
|
|
|
)
|
2011-12-04 16:52:43 +01:00
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
args: array(
|
|
|
|
0: Arg(
|
|
|
|
value: Expr_Variable(
|
|
|
|
name: b
|
|
|
|
)
|
|
|
|
byRef: false
|
|
|
|
unpack: false
|
2011-12-04 16:52:43 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
2: Stmt_Expression(
|
|
|
|
expr: Expr_New(
|
|
|
|
class: Expr_Variable(
|
|
|
|
name: a
|
|
|
|
)
|
|
|
|
args: array(
|
|
|
|
)
|
|
|
|
comments: array(
|
|
|
|
0: // class name variations
|
|
|
|
)
|
2011-12-04 16:52:43 +01:00
|
|
|
)
|
2016-04-20 15:03:18 +02:00
|
|
|
comments: array(
|
|
|
|
0: // class name variations
|
|
|
|
)
|
2011-12-04 16:52:43 +01:00
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
3: Stmt_Expression(
|
|
|
|
expr: Expr_New(
|
|
|
|
class: Expr_ArrayDimFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: a
|
|
|
|
)
|
|
|
|
dim: Scalar_String(
|
|
|
|
value: b
|
|
|
|
)
|
2011-12-04 16:52:43 +01:00
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
args: array(
|
2011-12-04 16:52:43 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
4: Stmt_Expression(
|
|
|
|
expr: Expr_New(
|
|
|
|
class: Expr_StaticPropertyFetch(
|
|
|
|
class: Name(
|
|
|
|
parts: array(
|
|
|
|
0: A
|
|
|
|
)
|
2011-12-04 16:52:43 +01:00
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
name: b
|
2011-12-04 16:52:43 +01:00
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
args: array(
|
2011-12-04 16:52:43 +01:00
|
|
|
)
|
2016-04-20 15:03:18 +02:00
|
|
|
)
|
2011-12-04 16:52:43 +01:00
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
5: Stmt_Expression(
|
|
|
|
expr: Expr_New(
|
|
|
|
class: Expr_PropertyFetch(
|
2011-12-04 16:52:43 +01:00
|
|
|
var: Expr_Variable(
|
|
|
|
name: a
|
|
|
|
)
|
|
|
|
name: b
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
args: array(
|
|
|
|
)
|
|
|
|
comments: array(
|
|
|
|
0: // DNCR object access
|
|
|
|
)
|
2011-12-04 16:52:43 +01:00
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
comments: array(
|
|
|
|
0: // DNCR object access
|
2011-12-04 16:52:43 +01:00
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
6: Stmt_Expression(
|
|
|
|
expr: Expr_New(
|
|
|
|
class: Expr_PropertyFetch(
|
|
|
|
var: Expr_PropertyFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: a
|
|
|
|
)
|
|
|
|
name: b
|
2011-12-04 16:52:43 +01:00
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
name: c
|
2011-12-04 16:52:43 +01:00
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
args: array(
|
2011-12-04 16:52:43 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
7: Stmt_Expression(
|
|
|
|
expr: Expr_New(
|
|
|
|
class: Expr_ArrayDimFetch(
|
|
|
|
var: Expr_PropertyFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: a
|
|
|
|
)
|
|
|
|
name: b
|
|
|
|
)
|
|
|
|
dim: Scalar_String(
|
|
|
|
value: c
|
2011-12-04 16:52:43 +01:00
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
args: array(
|
2011-12-04 16:52:43 +01:00
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
)
|
|
|
|
8: Stmt_Expression(
|
|
|
|
expr: Expr_New(
|
|
|
|
class: Expr_ArrayDimFetch(
|
|
|
|
var: Expr_PropertyFetch(
|
|
|
|
var: Expr_Variable(
|
|
|
|
name: a
|
|
|
|
)
|
|
|
|
name: b
|
|
|
|
)
|
|
|
|
dim: Scalar_String(
|
|
|
|
value: c
|
|
|
|
)
|
|
|
|
)
|
|
|
|
args: array(
|
|
|
|
)
|
2011-12-04 16:52:43 +01:00
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
9: Stmt_Expression(
|
|
|
|
expr: Expr_New(
|
|
|
|
class: Name(
|
|
|
|
parts: array(
|
|
|
|
0: A
|
|
|
|
)
|
|
|
|
)
|
|
|
|
args: array(
|
2012-05-12 14:02:35 +02:00
|
|
|
)
|
|
|
|
)
|
2017-01-19 22:25:22 +01:00
|
|
|
comments: array(
|
|
|
|
0: // test regression introduces by new dereferencing syntax
|
2012-05-12 14:02:35 +02:00
|
|
|
)
|
|
|
|
)
|
2011-12-04 16:52:43 +01:00
|
|
|
)
|