2 ms·
As PHP’s RFC says, right-associative ternary is useful and intuitive. I don’t need no parentheses, the meaning is clear and obvious and doesn’t go wrong in any
by chrismorgan 5y ago
As PHP’s RFC says, right-associative ternary is useful and intuitive. I don’t need no parentheses, the meaning is clear and obvious and doesn’t go wrong in any environment that I or those I work with use, and doesn’t even go wrong in PHP any more (warning in 7.4, syntax error in 8). I’m not going to compromise the beauty and editability of my code by inserting superfluous parentheses—they’d make me have to think more about the meaning of the ternary chain, not less.