Recently, I listened to Lex Friedman's podcast with Pieter Levels. Pieter talked about his technology stack for building startups: vanilla PHP, jQuery, and SQLite.
Hype is exciting, but there is no better technology proof than long-term usage by sustainable business.
The podcast inspired me to write my views about why PHP is the best choice for long-term.
Pieter talked about his hyper-focused approach to learning new skills. Yet he never had the need to learn Angular, React, Vue, or Next. Hype comes and goes.
Do you know this joke?
"A new JS framework is released every day."
But it's no joke for a business that runs on it.
In 2016, a company contacted me to help upgrade their internal CRM. They used Angular 1 and wanted to go to Angular 2. It would require a complete rewrite.
Another path was to migrate to React, the "Facebook framework".
In 2018, Vue became the new competition. Another rewrite would be required to attract more developers.
Next, Alpine... there are dozens of new tutorials on YouTube on the brand new JS framework. They have 90 % feature overlap, just slightly different syntax sugar.
This is great fun for developers to learn and try new shiny things,
but a big problem for business costs.
Imagine having a house where you have to replace all windows every winter. There are new standards, new dimensions and a style that doesn't fit the entire building.
Now, let's examine the same situation from the side bank of the fence.
Which frameworks are used by the majority of PHP developers?
Symfony and Laravel.
Symfony 1 was released in 2007, and Laravel 1 was released in 2011.
Both are time-tested, community-driven, and, most importantly, still being used by businesses. At least based on the dozens projects we've helped to upgrade.
We have 1 new PHP version released every year, with a clear release path ahead:
If a market has one big player, it's a monopoly that degrades into stagnation. There is no space for new players or evolution. Until Apple and Linux came along, Microsoft was the only player in the game, and it dominated with terrible user experience and extreme license prices.
On the other hand, if the market has too many players, it's a battlefield where customers are lost in the noise. In such an environment, you can hardly find a stable solution as it will soon be replaced by a new, well-funded competitor.
PHP is unique.
Did you know it's the only programming language with 2 strong framework players? I'm profoundly grateful that we have such a market. This competition keeps both Symfony and Laravel working hard to improve and innovate. It also gives us customers a choice based on personal feelings or preferences.
Ultimately, this gives companies a solid foundation they can build on for a decade.
This healthy competition has positive side effects in the community. Both organize a couple of conferences a year, where you can meet great friends, find a job, or learn new skills.
If you're working in vanilla PHP like Pieter, there are dozens of conferences a year across Europe, America, Asia, and Australia.
The PHP ecosystem didn't get stuck on bare websites in a browser. You can build APIs, desktop apps, machine learning, static analysis, and tools that improve the code for you. It's a full circle.
Last but not least, other languages lack advanced technology.
Nikita Popov came to PHP core in 2014 and brought AST to PHP 7.0 core. It's not a new PHP feature we can use, but it made the PHP core codebase (written in C) much simpler to work with. It's a similar jump like moving from HDD to SSD drive or from a button phone to a smartphone.
The problem is that PHP itself is written in C. Even the best PHP developer cannot code in C at a world language level. If PHP stopped here, it would still be as good as its best C developer.
But! In parallel, Nikita also created another tool. It opened up new possibilities to PHP developers—the php-parser.
Imagine an AI that can be as smart to improve itself
or robots as advanced to build better versions of themselves.
I call this self-reflection technology. It's an evolutionary level when a programming language can improve itself. PHP is unique in this matter.
JavasSript has a few such tools but they are inconsistent because of many language dialects.
In the PHP community, we have PHPStan, a tool that can find bugs in your code without running it. Is there a new bug in your project that we missed? Add a new PHPStan rule, and it will never happen again. Never. It's a read-only tool, like the GPTs we have now. It doesn't work for us, but it's helpful at any moment we ask for help.
We also have Rector, a tool that can improve and upgrade our code. Most importantly, it can use the best current knowledge. Has someone in India came up with a better way to write a controller in PHP 9? They can create a Rector rule that anyone in the world can use without any knowledge about controllers or PHP 9.
All other languages I know of are still stuck in the read-only phase—the new features of languages are spread via articles, videos, or conference talks.
There is no tool you could run from CI to convert your Python 2 project to Python 3. However, there is a tool you can run to convert your PHP 5.2 project to PHP 8.4. In the case of vanilla PHP, this can be done in a single day, fully automated.
That's why PHP is the best choice for long-term business costs.
I'm not saying PHP has the best syntax, generics support or CPU-level speed. It's about the whole package that a business builds upon.
All of the PHP tools mentioned are open-sourced and not under commercial or benevolent dictatorship. If something changes–and it will–, we can adapt.
That's why I agree with Pieter and his vanilla PHP stack. It's not about the language, but the ecosystem around it, and PHP is the best for long-term business costs.
Happy coding!
Do you learn from my contents or use open-souce packages like Rector every day?
Consider supporting it on GitHub Sponsors.
I'd really appreciate it!