-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
Code like:
<?php ( $a ? $b : $c ) ? $d : $e;Is parsed correctly:
array(
0: Stmt_Expression(
expr: Expr_Ternary(
cond: Expr_Ternary(
cond: Expr_Variable( name: a )
if: Expr_Variable( name: b )
else: Expr_Variable( name: c )
)
if: Expr_Variable( name: d )
else: Expr_Variable( name: e )
)
)
)
But PrettyPrinter will outputs:
<?php $a ? $b : $c ? $d : $e;So if you run the code it will gives:
Deprecated: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
Metadata
Metadata
Assignees
Labels
No labels