mirror of
https://github.com/nikic/PHP-Parser.git
synced 2025-07-28 01:40:15 +02:00
In most circumstances we are interested in the whole string, not the parts split by namespace separator. As names are common, this representation measurably improves memory usage and performance.
44 lines
962 B
Plaintext
44 lines
962 B
Plaintext
Throw expression
|
|
-----
|
|
<?php
|
|
test(throw $x);
|
|
$a ?? throw new Exception;
|
|
-----
|
|
array(
|
|
0: Stmt_Expression(
|
|
expr: Expr_FuncCall(
|
|
name: Name(
|
|
name: test
|
|
)
|
|
args: array(
|
|
0: Arg(
|
|
name: null
|
|
value: Expr_Throw(
|
|
expr: Expr_Variable(
|
|
name: x
|
|
)
|
|
)
|
|
byRef: false
|
|
unpack: false
|
|
)
|
|
)
|
|
)
|
|
)
|
|
1: Stmt_Expression(
|
|
expr: Expr_BinaryOp_Coalesce(
|
|
left: Expr_Variable(
|
|
name: a
|
|
)
|
|
right: Expr_Throw(
|
|
expr: Expr_New(
|
|
class: Name(
|
|
name: Exception
|
|
)
|
|
args: array(
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|