Is PHP relevant?
Mike Oram Feb 8
One of the most common questions I’m asked by academees, applicants and even other developers, is, ‘why do you teach PHP?’ or, sometimes even, ‘isn’t PHP a dead language?’
Let me very clear about this from the start. PHP IS NOT DEAD.
As of December 2017, PHP makes up over 83% of server side languages used on the internet. Much of that is made up of PHP-based content management systems such as WordPress, but even if you remove pre-built CMS from the equation, PHP still makes up over 54% of the web. In fact, if you take a look at the graph below, you can see that the PHP market share was consistent throughout 2017, and has even increased.
So why do so many people claim PHP is an irrelevant or dead language?
There are two reasons as far as I can see. First, it’s sometimes a a legacy opinion passed down from developer to developer. When PHP was in its early years, it was a relatively slow language, with many inconsistencies and very little direction. The language has evolved a lot over the years however, and since PHP 5.3 was released in 2009, most of these old complaints have been fixed. The latest version (7.1) is an extremely fast, streamlined language with a strong OO focus.
Second, PHP is a very flexible, loosely typed language. This makes it very easy to pick up and start writing, but also very easy to write poorly. You could say that it’s a victim of its own success. But when written properly, following methodologies such as DRY, SOLID and MVC (all concepts we teach on the academy course), it is a very powerful, diverse and fast language with a lot to offer.
So no, PHP is not dead. While like any language, it has its flaws, the statistics really do speak for themselves.