4 ms·
A lot of people are too proud to be associated with PHP. I am ready to admit that know nothing about the language except that a lot of people make cool things
by calpaterson 11mo ago
A lot of people are too proud to be associated with PHP. I am ready to admit that know nothing about the language except that a lot of people make cool things with it.
My favourite PHP product at the moment is BookStack (https://www.bookstackapp.com/ https://www.bookstackapp.com/), a really good wiki. I run an instance for my family and it's great.
But there are loads of things. And I notice that many of the sites I like using...are built on well maintained PHP stacks.
- nake89 11mo ago> A lot of people are too proud to be associated with PHP. How so?
- type0 11mo agoVanity, it's "PersonalHomePage" language
- misiek08 11mo agoA lot of mediocre devs sitting at corporations that migrated from PHP to Java and currently can’t write relatively good code in any language make jokes of PHP, because it was popular for some time. They won’t admit the language gave them food, they have no idea how language looks today and are way too proud to admit any of that.
- nusl 11mo agoPHP is a very pleasant and straight-forward language to work with. I enjoyed my time working with it, though I did also see quite a lot of very poor code. I think the danger with PHP is more its ability to easily cause *very bad things*. This would partially be poor training (my University literally taught PHP with SQL-injectable examples), and I think the language itself making it very easy, such that less-experienced developers using it - most of them, early on - don't realise what's wrong until it's gone wrong. With PHP being such an early tool online, and the above properties existing, it earned a reputation for being insecure and bad.
- ale42 11mo ago> I think the danger with PHP is more its ability to easily cause very bad things. Is there any language where you can't?
- jojobas 11mo agoProbably not, but not most languages are not inviting to do them.
- s1mplicissimus 11mo agoGive me an example where PHP invites developers to do terrible things and I'll show you 2 other popular languages that invite equally bad or worse things :) Or as Bjarne Stroustrup put it: There's two types of languages: The ones people complain about and the ones noone uses
- Yokolos 11mo agoYou can do crazy things in every language. However, in a language like Java, the crazy things are more conceptual (factory for factory of factories) and not basic things like what does == mean or problems with weak typing and implicit conversions. A lot of the issues with PHP can be avoided in modern PHP using things like strict_types=1, but most of the time, we don't get to work with projects using best practices. And I'd rather work with a bad Java project than any bad PHP project (which I have had the misfortune of maintaining).
- babuskov 11mo agoFunny that you picked == as an example when == is very counter intuitive in Java and is one of the common pitfalls for beginners: String a = new String(); String b = new String(); a = "test"; b = a + ""; if (a == "test") { // true } if (b == "test") { // false } if (a == b) { // false } Just like PHP, you have to read the docs to use it properly.
- rob74 11mo agoI'd take PHP instead of JS/TS + framework-of-the-day on the backend anytime. Ok, PHP is usually also paired with a framework (cough Laravel cough), but at least there the situation is more stable, not to mention more mature. Unfortunately, I'm not the only one making the decisions...
- kijin 11mo agoPHP is a reasonable choice if you care about writing something that will still work out of the box 10 years from now. But of course this assumes that you work with a team that can see a year ahead, let alone 10.
- dgb23 11mo agoPHP has introduced breaking changes, deprecations etc. in a somewhat rapid fashion. PHP doesn't prioritize stability, but language features and cleanup. It's an impressive technical endeavor that has its merits, but comes with a tradeoff. Within the last 10 years, the language itself broke twice. And that's not counting the ecosystem on top of it. Common frameworks, libraries etc. tend to break relatively often as well. There are languages that are _much_ more stable and reliable than that.
- conradfr 11mo agoThat has not been my experience and I have a project that started in 2017 with PHP 7.1 & Symfony 3.3 and is now at PHP 8.4 & Symfony 7.3 with plenty of dependencies. Not everything will always update flawlessly but with Composer and a popular framework with planned depreciations and releases the ecosystem tends to sync fairly well.
- stefanfisk 11mo agoWhich specific deprecations and breaking changes are you referring to?
- hu3 11mo agoThis has not been my experience at all. PHP code requires very little maintenance to keep working for a decade+.
- ThatMedicIsASpy 11mo agohttps://github.com/AzuraCast/AzuraCast https://github.com/AzuraCast/AzuraCast AzuraCast because I like learning by looking at code and hosting my own radio/music
- bawolff 11mo ago> My favourite PHP product at the moment is BookStack (https://www.bookstackapp.com/ https://www.bookstackapp.com/), a really good wiki. Another wiki that uses php is Wikipedia. People like to shit on php but it powers some of the largest sites in the world. At the end of the day, programming language doesn't matter much. You can be a good programmer in any language and a bad programmer in any language.
- unsungNovelty 11mo agoIt's flarum for me - https://flarum.org/ https://flarum.org/ A really good forum software.
- etothet 11mo agoI’ve made my living amd career off of PHP and I enjoy its modernization. Coding in PHP can be a lot like playing the guitar or writing poetry: many people can do it, but it’s easy to do very badly.
- jjice 11mo agoModern PHP is a damn fine, fast language. I wrote production PHP from 2021 to 2023. The problem with PHP wasn't the language or the ecosystem (PHP community packages are very solid in my experience), it's the existing PHP code you'll work with and the people that hire for PHP. My salary literally doubled within two years of getting a gig that wasn't PHP. If you see a listing for PHP dev work, there's a good chance it's notably lower salary. There are still solid gigs for it, but I swear they lean lower. The other problem is the existing codebases. There is some awful legacy PHP 4 era code. There are also a lot of practices that old PHP had that are just awful to work with, and there's a bit of variety in there. So many bad data access patterns out there. Many of old PHP codebases have their own spin on that kind of thing. I understand this isn't actually due to the language, but there is a real correlation (in my experience) between old bad code and it being in PHP. Which is totally fair because it was a good tool to reach for to "get shit done (r)" and that code was successful enough to have to continue to live. Modern PHP has, thanks to the core language and the big frameworks, made it wonderful. I lead a big push to go from PHP 5.8 to PHP 8.1 at the time at my last company. It was wonderful. The quality of the code we were enabled to write was huge. If I was starting a new project today, I probably wouldn't reach for PHP, but I'd gladly join in on a modern (last ten years) Laravel project.