DEV Community

Cover image for Is PHP Dead in 2021? You Might Be Wrong About PHP! Is it worth learning or is PHP dead in 2021?
Pranav for CODEDAMN

Posted on • Originally published at codedamn.com

Is PHP Dead in 2021? You Might Be Wrong About PHP! Is it worth learning or is PHP dead in 2021?

Watch the YouTube video here
As a developer, you might have heard that "PHP is dead", "PHP is very old no one uses it these days!" But is it really dead?
Let's discuss the Pro's and Con's of the PHP, and then let's determine whether PHP is really dead.
Pros
1.PHP is widely used on the Internet
According to the blog on kinsta, 79% of the web uses PHP till date on production. Well, you may think why is this because WordPress is a significant contributor here. WordPress is built on PHP, so all the websites that use WordPress are internally built on PHP.
2.PHP is getting faster and better
As PHP is used so widely on the web, new improvements and updates are coming to PHP perpetually, like in the recent PHP 8 update, it got a JIT(just-in-time) compiler. PHP is getting faster. As you can see in the image, its ability to handle the number of requests per second has been increasing steadily.

Even as PHP is getting faster, it is slower when compared with Golang and Java.

  1. Very high-quality frameworks have been developed for PHP PHP has very high-quality frameworks, and one of those is Laravel. Laravel is a very good back-end framework for PHP and has built-in good practices and security for your web app. In fact the first version of Codedamn was also built using PHP itself.
  2. PHP has a solid developer community PHP also has a huge developer community that can help you overcome any technical difficulty you face. On websites like Stackoverflow, many developers respond and help you tackle your bugs in PHP.
  3. Freelancing using PHP PHP is very popular in the freelancing community as it is one of the easiest languages to learn for non-technical people to manage their back-end part of a website. So many people still offer some best gigs to manage PHP websites. So now you also have a pretty good chance to freelance using PHP as well. Also, you have WordPress that helps you with wp-config files. Cons
  4. Performance PHP suffers from lousy performance when compared to languages like Golang and runtime like Node.JS because it is fundamentally architectured to run a different process for every request that it gets. So that's a good reason why we should use other languages than PHP. But that should not stop you from learning PHP. PHP developers still have jobs and earn good money. PHP will probably play a vital role on the web for this decade, at least.
  5. Context switch cost for Full Stack Developers If you want to become both a front-end and a back-end developer, you know JavaScript is a mandatory language. So if you start using JavaScript in the front-end and PHP in the back-end, it may become a severe issue if you are working on both languages at the same hour, so this is a significant reason why some developers prefer JavaScript over PHP. Is PHP Dead? NO. PHP is not dead. We still don't know what the future holds for this OG language. We may see the most sustainable features in future updates. So time will tell. So by now, you might have figured that out whether you want to learn PHP or not. If you're going to become a sound back-end engineer and be a master of a language, there is nothing wrong is learning PHP. So don't trust all the comments on the internet about PHP. It is also a good place to start your programming career as well.

Top comments (0)