array(1) { ["header_image"]=> string(71) "https://mayden.academy/wp-content/uploads/2018/02/old-to-new-header.jpg" }

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.

Use of PHP in websites 207 graph image

Back in September I wrote a blog about ‘industry relevant’ skills and technologies. At the time of writing that blog, PHP and JavaScript were by far the most sought after languages in the job market. That remains the case. Not coincidentally, they’re the two languages we spend the most time on at the academy.

Let’s look at some of the usage stats around other languages, starting with the most popular ones being taught to new programmers. Universities tend to focus on Java and / or C, and as a result of this many new startups are choosing to build their applications in these languages. This means that Java now makes up about 2.5% of the web’s server side languages. With C nowhere to be seen, but ASP.NET – which is a web framework sometimes taught by universities – at 14.2%. Languages such as Python, Ruby and Server-side JavaScript are the most common focus of programming bootcamps, yet collectively these languages only cover 1.2% of the internet. Server-side JavaScript (Node.js) is currently the fastest growing server-side technology, and though still relatively small, it’s certainly one to be prepared for (and we currently dedicate a week’s learning time to Node.js in the academy curriculum).

Techrepublic recently published an article about the top languages to learn in 2018, with both PHP and JavaScript appearing in the top six, and with PHP moving from 9th to 6th in 2017.

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.