Hacker News new | ask | show | jobs
by ccajas 1963 days ago
It sounds like a sad story. PHP's specialization is in rendering dynamic web pages. It was its ONLY purpose (ignoring niche projects like GTK bindings, etc). And yet even against general purpose languages/VM's (where using it for backend web is a choice, not its only purpose), PHP could not remain competent in its own class.

It's like building a car designed for just one thing, to go very fast on straight roads, then a general-purpose car comes along and somehow beats this car in this category.

How did it lose its grip? Did the PHP Group become too complacent being at the top?

1 comments

PHP = a programming language + templating engine.

Most general purpose languages do not have built in templating and do not have templating in their standard library.

As a programming language, many modern languages have a faster and more optimized runtime than PHP. If the Laravel authors ported their framework to Node, Python or Java it would certainly run faster.

As a templating language, it has to run on the server. That means you pay for the computing cost of templating not the end user. Unless you do your templating using a JS solution.

On top of that, you have to transfer a rendered page from your application server instead of just serving files from CDN at a fraction of the cost.

Overall, PHP is the wrong solution for the wrong problem. I used PHP in 2004 and then moved on. The industry at a large also moved on.