Negative Squares

no-email (Damien Seguy), Damien Seguy
Fri, 01 Sep 2023 00:00:00 +0000

This is still my favorite PHP bug : literal negative value is squared, and is ... negative. In fact, the ``**`` operator has precedence over the minus operator, and the square is then executed before the negation. Hence, the negative results. It is useful to process, correctly, parentheseses, but not integers.