Why PHP should be renamed to HypeScript

Florian Bauer
6 min readFeb 27, 2023

--

#LaraconIN is over. A vibrant PHP community celebrated in Ahmedabad, Gujarat in India, and the conference was like no other: There was beatboxing, garba dancing, great food, like-minded people engaging the ecosystem and so much more. Around 1200 Developers joined to see their heroes from the Laravel Core Team in person — the queue to take a selfie with Laravels founder Taylor Otwell seemed never-ending. Laravel India showed the world how crazy a conference can be, an engagement that will not be forgotten any time soon.

But PHP is in big trouble and somehow nobody seems to care. When the Laravel Core team was on stage and asked about the status of PHP, the responses felt very familiar — a mix of personal pride, sarcasm, and justification. The day after the event the “PHP is dead” tweets became a meme on Twitter and as much as I understand their opinion a discussion is long overdue. We shouldn’t downplay the issues but rather think of possible solutions.

The numbers hide the truth

Some people say PHP is dead — which is not true, it still grows on the Web every year. WordPress runs 43% percent of the worldwide web right now, big applications like Wikipedia keep it as a core stack, and 79% of the web is powered by PHP.

Usage of top CMS Systems on the overall world wide web, w3techs.com

Nevertheless, the numbers are misleading, PHP is slowly dying and we need to do something about it.

The elephant in the room

Let’s face it: PHP is not cool anymore. Every PHP developer knows the weird moment when interacting with other developers, I hate that moment.

Many years ago when PHP started the Web2 Movement it was the most popular and mainstream way to add dynamic content to static websites. It was the go-to language when creating user interaction and its success seemed unstoppable. But there are three main issues with PHP and the reason why so many people deride it nowadays:

  1. Language: A long time ago the language was packed with unsafe patterns, weird functions, global namespace spaghetti, and bad practices. This is not the case anymore.
  2. Ecosystem: Many badly developed plugins (especially in WordPress) and bad self-developed code led to broken applications and hacked websites. The ecosystem was not as mature as it is now.
  3. People: Most people made up their minds when the two points above were very present and haven’t changed their opinion since. It is bad development in their eyes, and it doesn’t matter that it has massively improved since then.

All these issues have led to decision-makers in big corporations putting PHP as a security risk and deciding to not allow PHP anymore — and due to the lack of a lobby, nobody did anything against it. On a western and global enterprise level, PHP is long dead and there are no intentions to change anything about it. This is bad because corporations are the ones requesting talent from the market and education system.

So when you go to any European University today (maybe others too), they will teach you a ton of JavaScript while PHP is just a side note. Young people don’t think PHP is cool and future-proof, young talent always opt into JavaScript or Java, or Python and that is the reason why you mainly see men between 35–50 years on PHP conferences and meetups.

To take the overall web adoption as a performance indicator is pretty useless, considering that traffic and usage are not evenly distributed and most websites on the web are… pretty bad. So even as web numbers seem good, the number of popularity looks pretty bad. This needs to change!

Pull requests on Github per Programming language, the Tiobe Index and the PYPL Popularity Index show a very similar graph.

How did JavaScript pull it off?

JavaScript was in a similar position. But it was the only language that runs safely in the browser so even though the language is pretty bad, developers had to make it work. A super rich ecosystem of frameworks and compilers evolved, that pushed new languages like Typescript to silence even the most prominent critics.

But the main reason for JavaScripts success were young developers. In my opinion, JavaScript became part of the enterprise stack because it was the cool way to develop in enterprises and therefore the way to attract young talent for the company.

Possible Solution

The crazy thing is that if you know PHP very well and maybe even participate in the Laravel ecosystem, you know how freaking good it is. Anybody who knows Laravel and tried to tip a toe into the NestJS, NextJs, and JavaScript frameworks stack knows how far ahead Laravel is. Just look at the features or GitHub issues and compare maturity (= maintainability) and future proof of the system. Vercel just announced cronjobs… Umm, cool I guess? How about migrations, queuing, event sourcing, or all the other stuff necessary to run platforms?

But this doesn’t mean it will stay that way. Young people need to come on board and do crazy things and enterprises need to allow another look into the current state of PHP and challenge their former opinions on it. How can we get them back on board?

It is simple: Just rename the next version of PHP to HypeScript and do a major brand repositioning. Yes, it will be perceived as something new and people will take a look at it. There would also be a chance to deprecate older chunks of PHP or add stricter rules like making types mandatory to improve quality and performance along the way.

Brent Roose shared his idea of PHP becoming more like TypeScript a year ago on his Channel (thank you @chrolear for pointing it out). I don’t think that these drastic changes are required to make this change.

PHP just has a problem with its brand, not with its technology — so this might be even possible to pull off without changing the programming language at all. People just need a reason to look at it with a fresh mind and a name change will show people that the old PHP is a thing of the past.

The name HypeScript sounds like a logical name for me, it pays its respect to the name PHP (PHP: Hypertext Preprocessor) as well.

But… How?

Yes, this might feel like a non-trivial thing.

But currently, there are only a limited number of big players keeping PHP alive. Aside from WordPress, Symfony, and Laravel, there are mainly legacy applications running on PHP that can continue to do so. The adoption rate of PHP8 is crazy slow (~3%), but people who adopt PHP8 will welcome the change, they are at the forefront anyway.

Suppose the PHP Core Team (PHP Foundation) with the Help of Taylor Otwell (Laravel) and Fabien Potencier (Symfony) would push the topic, I think big parts of the professional PHP community would follow. Hack, maybe there might even be a way to convince Matt Mullenweg (WordPress) to finally make a new version of WordPress based on modern principles. Nikita Popov should be convinced to return as an advisor in the process, as his contributions to the language made such a difference.

I remember when Facebook released HACK and its HHVM Server to power its PHP applications, it was such a trojan horse to develop PHP. Whenever facing the security department or an enterprise architect of a bigger company, telling them the application stack is written in HACK (a new cool language from Facebook), they raised their eyebrows and got curious — when I’d say PHP they just didn’t hire me, because they couldn’t.

Let’s claim PHP as a legacy and provide new branding as a successor, you can bury all the negativity it comes with and become a serious competitor that also the cool kids would like to use — without changing the whole ecosystem! In some years we will all be old developers and the youngsters will treat us like that, better get them on board now!

Future

As the Enterprise stack is very different in terms of budget and resource allocation, the presence of a HypeScript would allow companies to grow like their Java counterparts with hundreds and thousands of developers working on that stack. Young people would start to reinvent frameworks and libraries and new ideas would become much more present.

This sounds much better than getting old! Maybe the youngsters here at LaraconIN will have an impact on us old developers — it seems like they are the ones keeping PHPs popularity alive. I love programming in PHP and I don’t want to be so quiet about it.

Thank you for reading, you can find me on LinkedIn and Twitter.

+1200 Developers at Laracon India, Picture by LaraconIN

--

--