mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-12-14 18:16:06 +01:00
54 lines
866 B
Plaintext
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
|
|
)
|
|
)
|
|
) |