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 🤷🏻♂️
@Crell No kidding! It's had an open ticket to match their versions for months now, but upgrading the PHP version on shared servers is complicated. I definitely miss our solid Clojure setups.
@worldsendless containerizwd dev envs FTW.
@Crell I did a bit of Docker and liked it, before we were able to consolidate to the #JVM. Now JVM is my #container (since I don't go deep and actually customize it besides memory specs)
@worldsendless don’t forget to return the borrowed code…
@chaos0815 We were too late to take it back. It died under our fingertips.
@worldsendless
PHP had some flaws and problems so it was simply necessary to do a radical change at some point. Everything has been announced in advance, and there's always been a "deprecated" flag in advance to warn programmers. It's just like it is, I'm glad the PHP team finally released #PHP 8 where almost everything behaves like expected (and now the language is far better than #JavaScript, IMHO).
@amarok !!! What leads you to think it better than JS? (not a JS lover here, but historically I hate it less than old PHP)
@worldsendless @amarok PHP is now effectively a typed language. JS is not. (TS doesn't count.)
JS async is just a mess to work with. #SorryNotSorry
The Packagist ecosystem is vastly more robust and reliable than npm/yarn/whatever.
Oth still have warts from their youth, and both have improved dramatically in the last decade. But I'd still rather work in PHP than JS most of the time for the type system alone.
@Crell
Just my subjective opinion, I know JS and TS quite well to compare them to PHP. That doesn't mean that JS is a bad lang. What I like about PHP is its similarity to C, also the slow speed of PHP's evolution is a key factor. Built-in support for types is a plus. I used to work fulltime as front-end dev for 10+ yrs. The amount of changes & new features during the past 5 years alone is just crazy, and JS is still able to surprise. PHP feels so calm. I just prefer back-end now.
@worldsendless
@worldsendless at work we have both PHP and Clojure, and recently underwent a migration to PHP8. It was a royal pain, and I hope to transition away from PHP so that we don't have to migrate to another major version.
Don't ask me how many times we've upgraded our Clojure version or the underlying JVM, as it's so uneventful I don't remember.