4 ms·
used php in 2015, decided that it's not that nice. last couple of months, I've been banging my head with php7. granted, it's a legacy project, but it is still t
by lemper 4y ago
used php in 2015, decided that it's not that nice. last couple of months, I've been banging my head with php7. granted, it's a legacy project, but it is still the same php 7-8 years ago.
- dmoustache 4y agoIt is and it isn't. PHP 8.0 and 8.1 are a different beast altogether in my opinion and way better.
- unity1001 4y agoPHP is what you want to be when you configure it to be what you want it to be. From the strictest language to the loosest.
- esskay 4y agoIf you're inherited a legacy project thats a mess then the chances are it was written by some ass who's not following the languages generally accepted PSR standards. Proper PHP code is extremely easy to dive into and maintain. The benefit and downside of the PSR standards is they are optional. Sadly some think they know better and opt to roll their own convoluted 'standards' that just end up creating hell for the next person to come along and have to maintain their mess.
- cbsjjxhcc 4y agoPSR isn't generally accepted. It's a bunch of nobody know-it-alls that decided everyone needs to write java in PHP. No thank you.
- ianhawes 4y agoYou're just wrong. PSRs are widely accepted and all serious frameworks and PHP libraries implement them as needed. I haven't seen a PHP package in quite a long time that didn't implement PSR-4.
- cbsjjxhcc 4y agoExcept the largest framework doesn't. And the majority of libraries don't.
- esskay 4y agoWhat statistics source are you using to determine the 'largest framework' here? Even if we go back to the 2021 Jetbrains developer survey (https://www.jetbrains.com/lp/devecosystem-2021/php/ https://www.jetbrains.com/lp/devecosystem-2021/php/) out of the 11 named frameworks/platforms people are using all but 2 of them use PSR and composer. You keep making these assertations which frankly are coming across as absolute bollocks from someone who's stuck in the early 2000s.
- esskay 4y agoIf you actually think that you dont know the language very well. It's baked into Composer, all the major frameworks fully use it as to almost every major opensource project that isn't prevented from doing so by legacy code. And honestly if you're a PHP dev intentionally avoiding the widely adopted standards and know someone else is going to have to maintain your code then shame on you.
- chrisan 4y agoif its a legacy project then of course it would be the same php from 7-8 years ago, what exactly were you expecting? if you want to try modern php then start fresh or put in the work updating the legacy. its no different than being given a jquery project from 7-8 years ago and expecting a modern experience
- fcarletti 4y ago"what exactly were you expecting?" Exactly my thoughts. In the end it gets up to the developers are to blame by not taking time to upgrade their projects and end up with a legacy project. PHP does the deprecation and backward compatibility better than many languages (hello Python!) but still some effort is needed as a developer to ensure your codebase is updated. I'm not even talking about the architecture here, which of course is harder to change, but language features. And there is Rector to automate most of that!
- thrownaway561 4y agoPHP 7 is actually pretty good and was the version I stopped at. Upgrading to 8 shouldn't be all that bad and mostly you can just install the new version side by side with the old one. As with any interpreted language, you have to hit every page and what not in order to see if there are any issues that will arise. I don't know if at this point if PHP has a compiler as that would save a HUGE amount of time upgrading to new versions of the language.
- dgb23 4y agoThere are breaking changes from 7 to 8.