Closed
Description
Symfony version(s) affected
Expression Language 6.0.8
Description
I wanted to ask if this is desired behavior:
"1 + 2 ~ 5 + 3"
results in 29
I believe most people would expect the result to be "38"
, or in other words, the precedence to be: (1+2)~(5+3)
, especially when doing something like this: "index: " ~ index+1
I also think it's worth noting that in PHP the same expression (1 + 2 . 5 + 3
) results in 38
How to reproduce
<?php
$sel = new Symfony\Component\ExpressionLanguage\ExpressionLanguage();
$result = $sel->evaluate('1 + 2 ~ 5 + 3');
// $result is 29
Possible Solution
No response
Additional Context
No response