Hacker News new | ask | show | jobs
by coldtea 2025 days ago
>I’m trying so hard not to rant here

Not that hard, there's a bias showing.

First, those things you've mentioned are nothing to sneer at, are actual very good decisions (even if accidental) for a webserver-centric language.

They enable even naive developers to achive good scalability and isolation, and make fast development/debug cycles trivial.

Second, PHP has been improved by leaps and bounds from the days of 4, to the point of being a totally different language - all of the above points are already made in TFA.

Most arguments against it are moot today, or only apply superficially to the standard library, not the language (order of arguments, and so on).

Plus, it is speedy too, post 6, and especially post 7 (and there's a whole new JIT in 8). In any case, it has constant work on speed and memory reduction.

And of course it has a huge ecosystem of libs, projects, and frameworks, including not available anywhere else projects like Wordpress.

And the standard library (warts included) between JSON, DB drivers, LDAP support, SMTP, etc., is one of the most complete ones this side of Python, and perhaps even fitter than Python's for typical web development work.

Plus the deployment model is one of the best. Copy your files to a directory. Done. Add a redirect instruction to your server if you want to make it more fancy...

For third party libs, composer is up there with any major package dependency/install solution.

And for the core libs, plugins, etc installation is handled perfectly by the standard package managers in all Linux distros (and probably Windows too), and is even easier with MAMP, WAMP, etc for local development. Trivial to dockerize too if that's your thing.

1 comments

> PHP has been improved by leaps and bounds from the days of 4, to the point of being a totally different language.

No, most of bad parts are still here, all the stdlib inconsistancies and co are still here. Just because add more functions to a language doesn't change the bad design decisions at its core. The weird mix between dynamic typing and Java style rigidity (without most of its benefits) didn't go away.

What makes it a different language since PHP 5? more type guards? no, it's still a templating language.

Those strange naming choices definitely still have a cost but a lot of effort has been invested in documentation and alternatives to lessen their cost.

The mixed typing is... honestly, it's amazing. You really need to try it out for yourself in PHP7 or 8 - you can lean on really strict type checking in your application, go the old route or generally adhere to strict typing and relax that for entry points and library calls.

Lastly, PHP has come down hard and actually introduced backwards compatibility in a few key places to address some of the biggest WATs, I've been pretty impressed by the balance of the language stewardship.

It does definitely have warts, but there are warts on everything that people actually use in industry.