News for hackers. Stuff that matters.
Re:PHP in 2021 by theshrike79 on Friday April 16, 2021 @12:35AM (#26829506)
> My question is: why would anyone want to start something new with PHP in 2021?

Same reason as any, familiarity. Not all people, even in software, enjoy learning new stuff.

PHP might be the only language they ever learned and it has paid their bills for over a decade. No point in learning anything new unless it's absolutely required.

As long as major pieces of software are written in PHP, those people will have a steady job.

Re:PHP in 2021 by jalfresi on Friday April 16, 2021 @01:41AM (#26829962)
- shared nothing architecture - single threaded code execution context - copy files deploy

I was a PHP developer for over 15 years and those three concepts do more to lower the barrier to entry than any other language I’ve come across, and are constantly underestimated in their power to enable developers to concentrate on the business logic of their program.

Re:PHP in 2021 by theshrike79 on Friday April 16, 2021 @02:16AM (#26830205)
Indeed, there's nothing like just logging in to a linux box you got access at school or pay $1/mo for and typing 'nano public_html/index.php' - stuff Just Works.

Trying to get a python/ruby framework working in the same env, without root access? Whoooo boy. 20 years in the business and I still refuse to do that crap. FastCGI and the like just never work properly the first time in shared hosting.

You need virtual environments to keep dependencies at bay, debugging is a pain if the web server and fcgi process don't communicate properly. Most likely you won't have access to error.log so good luck figuring out why everything returns HTTP 500.

While you're still figuring out how to get helloworld.py to respond, the dude with PHP is already done.

Re:PHP in 2021 by joelbluminator on Friday April 16, 2021 @02:56AM (#26830489)
idk if we're talking about ease of getting started Heroku kinda made it as easy as it can get (started with Ruby but now supports all languages).
Re:PHP in 2021 by mschuster91 on Friday April 16, 2021 @06:32AM (#26832093)
You still need Heroku for that while there are a literal boatload of PHP shared-hosting providers.
Re:PHP in 2021 by xcambar on Friday April 16, 2021 @02:21AM (#26830254)
That's the answer.

It encompasses every aspect: familiarity, usability, low learning curve, low time to market, enablement, and, eventually, greater margins.

Re:PHP in 2021 by przemo_li on Monday April 19, 2021 @03:22AM (#26859927)
copy files deploy

That one is not great, unlike first two points. For one, larger bespoke programms need CI (and would benefit from CD). There is linting/type checking/testing to be done.

Secondly, "copy files deploy" is cheating. Somebody else did the job (hoster) and we are claiming that it is somehow benefit of PHP itself. Well? Did hoster do nothing? Really nothing at all? Nope. On top of that. Performant set up for PHP nowadays do not look that much differently then say, setup for Python.

Two first points are very good. Shared nothing architecture preclude existence of subtle bugs. While multi-threading in mutable, imperative code is the definition of subtle bugs. Those two keep PHP relevant and even on top of it's game (in certain domains).