4 ms·
PHP is my bread and butter. Yes there are still shops that use it. It doesn't really deserve the bad rap.
by 0x0nyandesu 5y ago
PHP is my bread and butter. Yes there are still shops that use it. It doesn't really deserve the bad rap.
- qsort 5y agoAs a Java dev I feel you. PHP, Java are both languages that used to be god-awful, but they have evolved massively in the past decade and most of the criticism is outdated.
- WesolyKubeczek 5y agoIt's bearable since version 7, and unless they make it another Java in version 8 which will make it unbearable again, it's gonna be ok. Kids who want to seem cool have moved on to Go and NodeJS, so PHP is mainly left with people who got some experience and mostly know what they are doing, save for those who really just twiddle Wordpress until it sort of appears to do what they want it to do. I suspect that PHP's ultimate fate is to become another Perl — a quite mature platform with very few people tending to it, obscure, with a community of very expensive veteran programmers.
- deweller 5y agoPHP 8 has been out since November. It adds some typing but everything is optional. PHP has always been a loosely typed language. Converting to a strongly typed language would against the grain of the entire culture and history of PHP. https://www.php.net/supported-versions.php https://www.php.net/supported-versions.php https://www.php.net/releases/8.0/en.php https://www.php.net/releases/8.0/en.php
- hparadiz 5y agoThe funny part is we still use Node for various sub tasks like webpack. Soon we'll be adding a unit testing layer to the JavaScript which will run in NodeJS as well. But I might wrap it with our PHP launcher. We'll see. The thing with PHP is it's very easy to understand in comparison with Perl. When Facebook did a study on which languages take the least amount of time to onboard new hires PHP won every time. It's also why they use their own version of PHP in house (Hack). It's 95% same thing with additional features like async built into their engine.
- godojo 5y agoThe bad rap was probably due to older versions. I used to program PHP in a professional setting (quite a while ago) and it basically interchangeable as any other system script (bash) executed by a parent http server process. The language itself at the time was mostly useful because you could execute a script made of HTML (or anything really) with some embedded magic tags interpreted as PHP instead of the opposite where you had to do some sort of template engine.
- acdha 5y agoOlder versions were worse but the current versions still have a lot of cultural baggage around the idea that ignoring errors is great and that's it's helpful to automagically convert data types. Changing that would break a huge amount of code and habit so the community is kind of slow-walking in that direction by deprecating features, adding opt-in config, and using linters to identify likely sources of problems. I don't disagree that it was useful — especially for having such a simple “upload a file, hit refresh” workflow — but popularity can work against you when it encourages optimizing for easy starts over long-term maintainability and a huge number of people learned dubious habits and aren't quick to switch.
- deleted 5y ago[deleted]