php-parser/test/code/expr/newAndClone.test
2011-11-27 11:20:35 +01:00

54 lines
866 B
Plaintext

New and clone
-----
<?php
new A;
new A($b);
new $a($b);
clone $a;
-----
array(
0: Expr_New(
class: Name(
parts: array(
0: A
)
)
args: array(
)
)
1: Expr_New(
class: Name(
parts: array(
0: A
)
)
args: array(
0: Arg(
value: Expr_Variable(
name: b
)
byRef: false
)
)
)
2: Expr_New(
class: Expr_Variable(
name: a
)
args: array(
0: Arg(
value: Expr_Variable(
name: b
)
byRef: false
)
)
)
3: Expr_Clone(
expr: Expr_Variable(
name: a
)
)
)