You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this might be related to some precedence issue in the way this is parsed. It may be parsed as - (2 ** 2) here instead of (-2) ** 2 (and so using a variable to store the -2 or using braces may not be affected)
btw, in PHP, if you remove the usage of a variable but inline the number (making it equivalent to the Twig code), you get the same behavior than the one you report in Twig.
PHP Version : PHP 7.3.3-1+0
20190307202245.32+stretch1.gbp32ebb2(Php versions 7.1 and 7.2 I tested it, and behavior is the same.)
Symfony Version : 4.2
Twig Version : symfony/twig-bundle": "4.2.3
Lsb Release : Debian GNU/Linux 9.8 (stretch)
in raw php code (as expected):
-2 ** 2 = 4
in twig (something is wrong in here);
{{ -2 ** 2 }}
{{ -2 ** 3 }}
...
The text was updated successfully, but these errors were encountered: