That was some PHP Happiness right there.
That was some PHP Happiness right there.
I wish I could run Python or JavaScript this way without losing too much performance.
PHP is like React on the server side, since the HTML output is a pure function of the request (and external state in eg a database of course). I like to think that it's no wonder that React got invented in a company totally built on PHP. Someone must've complained "I just want to change the URL and rerender the entire page with every user action, not mess around in jQuery". Someone else said "But that won't be fast enough!" and then someone must've gone "Hmm, but couldn't we make it fast enough?"
It's frustrating and baffling for anyone who wants to provide users with an easy way to self-install or self-host.
Easy server deployment of apps simply doesn't exist (unless you're Wordpress with one-click installs available everywhere). Many developers consider easy deployment a non-issue.
Here's a previous question I asked on the topic:
The reason it's nearly 2019 and no other language does this is because it's a really terrible way to manage software deployment.
I’m not a fan of PHP (the platform), but that sure sounds more like an opinion than an objective truth.
Could you outline some objective reasons why simply copying the code you want to run to the server you want to run it on is a bad deployment model?
Like it or not, PHP and many applications written in it are more user friendly than many of their alternatives, which is worth a lot more to average Joes than security or code quality.
PHP is really nice and easy to deploy, and it would be my first choice for trivial one-file scripts, but I wish people did not use those simple deploy methods on the big internet. The net is not a nice place it used to be 10 years ago, and today, deploying scripts without any OS-based security protection is just irresponsible.
(And yes, it is possible to deploy PHP in the secure way with proper privilege separation, but most of the large, existing projects recommend doing it insecurely)