Bug: Concatenation changes the order of elements by prettyprinter #1041
Open
Description
Given the code:
<?php
('abc' . 1) + 2;
And running the parser on the original and PrettyPrinter format we get different AST.
Original:
array(
0: Stmt_Expression(
expr: Expr_BinaryOp_Plus(
left: Expr_BinaryOp_Concat(
left: Scalar_String(
value: abc
)
right: Scalar_Int(
value: 1
)
)
right: Scalar_Int(
value: 2
)
)
)
)
Prettied:
array(
0: Stmt_Expression(
expr: Expr_BinaryOp_Concat(
left: Scalar_String(
value: abc
)
right: Expr_BinaryOp_Plus(
left: Scalar_Int(
value: 1
)
right: Scalar_Int(
value: 2
)
)
)
)
)
Metadata
Assignees
Labels
No labels