PHP - the king is dead, long live the king!
My thoughts on PHP. Is it dead? Is it still worth it to learn as a new developer?
There was a major shift in web development technologies in the past years, lots of things moved to the client-side, frontend frameworks such as Vue, React or Svelte are all the hype at the moment, Node.js & Python gained lots of popularity across backend developers.
Taking a glance at Google trends we're seeing PHP interest is in a downwards spiral.
The quick adoption of client-side rendering, the new shiny tools, plus its bad reputation among developers, seem to have slowly pushed PHP in the back of people’s minds.
PHP is the most widely used server-side language and also the most hated, sometimes viscerally hated. It has been reportedly dying for at least a decade.
Yet, it's still here as the web backbone, powering at least 7 out of 10 websites.
Why so much hate on a scripting language?
- it's technically inconsistent, has some design flaws
- it's easy to learn, doesn't appeal to programming purists
- it's very popular, but lacks the hype, there's nothing sexy in building with PHP
- it’s cool to hate PHP
A scripting language is just a tool that helps web developers solve problems. Getting fanatic about a language is as dumb as getting fanatic about a hammer.
There are only two kinds of languages: the ones people complain about and the ones nobody uses.
Yes, PHP might not be the best or the most modern scripting language, but it does the job for many and has come a long way since the dreaded version 3.
The difference in performance between PHP5.6 and 7.4 is huge, and considering the improvements and capabilities added under PHP8, it looks very alive and kicking, and better yet, faster than Python or Ruby.
There are a plethora of extremely popular tools built on PHP, such as WordPress that literally dominates the CMS market, MediaWiki the software behind Wikipedia, Magento and OpenCart, two popular open-source e-commerce solutions.
There's also a vibrant and lovely community around the Laravel framework, tons of modern web apps and APIs are built on Laravel (using PHP).
Is PHP dead?
It seems like it's slowly losing its steam, but it's not going away anytime soon.
Is it still worth it to learn PHP as a new developer?
It has a lean learning curve, and the likelihood of having to deal with PHP projects is huge. Learn the fundamentals, if you like it, dig deeper, but don't stop at it.
Continuous learning is a must for software developers, when you stop learning you quickly become irrelevant.
Do I use PHP?
Yes, on a daily basis.
I have to admit that I didn't start any new project on PHP for quite some time. But that's just because the projects were more suitable for another technology, not that I have something with PHP. Looking forward to spinning up a Laravel 8 app in the near future.
What do you think about PHP's future?