We borrowed some #PHP code from #StackOverflow that had nested ternaries without parenthesis. Turns out that as a fatal error in PHP 8 on our production server but not on the earlier PHP on our development server. Wow... a language with breaking syntax changes. I'll stick with sound #Clojure, where you never have too few parenthesis.
@worldsendless Turns out running different versions in dev and prod while copying and pasting code from Stack Overflow is a bad combination... 🙂
@Crell @worldsendless Sounds like a case of poorly written PHP to me 🤷🏻♂️
@arnan @Crell @worldsendless Nested ternaries deserve to be broken.
@worldsendless @kevin @arnan And were even broken in earlier PHP versions, because the default grouping logic was backward from literally every other language that has ternaries. 🙂 That's why it changed to make the () required, so that the language could transition to a more sensible grouping over time.