DEV Community

Mike Oram
Mike Oram

Posted on

Is PHP relevant?

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 2017 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.

Latest comments (33)

Collapse
 
aralovelace profile image
April Smith

I think when people who talk down PHP is dead and who haven't tried to use it (esp laravel ) they just said it to make then belong to a superior community.

Collapse
 
haldunuraz profile image
Haldun Uraz • Edited

Please have a look at the numbers.

similartech.com/technologies/php

Top Sites using PHP

Collapse
 
daniel88ftw profile image
Daniel

Checking back in 2019 - yep, PHP still relevant.

Collapse
 
franksierra profile image
Frank Sierra

About a specific thing that is going on here (and mostly anywhere when talking about PHP)...

By no means PHP it's "not scalable".
As with any language I have being using for the past 15 years or so, you have just two options on scaling either you scale UP or OUT and that’s language agnostic, it depends on the architecture you choose. (We are talking about web development)

The same applies to the usual “PHP code it’s poorly-written” that’s BS
Poorly-written code will exist no matter the language or framework so saying that is objective.

PHP gained traction since 7.1 and that was on December 2016 and v7.0 was released almost at the beginning of 2016
All the links to the articles I've seen on the internet when someone talks about how bad PHP “is” were published prior 2016 or talking about PHP <=5.6

Collapse
 
mrblu3 profile image
Mr Blue

Ye but companys moving away from php, its starting to be hard for php developers to actually find jobs.. if you want to work with php you will need to work with wp, magento or someone similar popular cms. even small company tend to use c# asp.net when they building webb applications.. I think the reason of this is because people now can build there own webbshops, blogs or whatever, without knowing any coding.. When it comes to making a company more automatic people useing c# instead of php. Php isnt dead for it has been so popular on the webb for many years it will take a couple of years until php developers isnt necessary but the digitization of the web starting two destroy the reason of coding in php. the language php insnt dead and will not be dead.

but the ofcource php developers will need to move on to something else for soon there is no meaning of hiring a php developer for the customer can do simple stuff on there own when it comes down to blog, webshops and stuff like that. So for php developers the language is a dead end, unfortunately...

Collapse
 
mrblu3 profile image
Mr Blue • Edited

Ye but companys moving away from php, its starting to be hard for php developers to actually find jobs.. if you want to work with php you will need to work with wp, magento or someone similar popular cms. even small company tend to use c# asp.net when they building webb applications.. I think the reason of this is because people now can build there own webbshops, blogs or whatever, without knowing any coding.. When it comes to making a company more automatic people useing c# instead of php. Php isnt dead for it has been so popular on the webb for many years it will take a couple of years until php developers isnt necessary but the digitization of the web starting two destroy the reason of coding in php. the language php insnt dead and will not be dead.

but the ofcource php developers will need to move on to something else for soon there is no meaning of hiring a php developer for the customer can do simple stuff on there own when it comes down to blog, webshops and stuff like that. So for php developers the language is a dead end, unfortunately...

Collapse
 
justageek profile image
Brian Smith

I only comment to offer an alternative to the whole "PHP doesn't scale well". I suppose we should tell all the folks at Slack (8 million active users daily) that they don't know what they are doing and they should switch to Java.

Collapse
 
gkapad profile image
kapad • Edited

I think, if is to make a discussion about something,
first we MUST define the place that the discussion refers to.
And i explain what i mean. We are in 2018, many and big changes happening in the web development.

(1).
Net is full with virtual servers. Most of the sites we visit,
now run, in virtual servers, big machines with many-many QEmu, ( or another
container technology), running apache/nginx/php, with very limited
resources, disk space or memory.

(2).
Too many develop frameworks. In what? In javascript. Write js code,
or compile, js code. Most of the ( almost all of them, vunerlable, by
content injection).

(3).
Mozilla, a very big browser, change complete its structure,
follow the style Chrome.
Why ? To better support running APPS.

So what is APP ? What has to do with a server ?
An APP have to do NOTHING with a server. APP is Javascript code,
that transfer the functionality of a server,
completly in the clients' browser !!!
Many sites now, follow this methology. Many home computers,
become unstable, when their browsers visit may of theese sites,
because of not enough RAM, big browser cache, and huge swap files.

Let's see 'developers.google.com/speed/pagesp...'.
Performance metrics, is most about Javascript.
If you want to measure something about PHP,
only the server response time, is about.

What i want to say, we must make clear for what we speak.
For Server development, or for Site development, is not the same.

To take a graphic program, and with your mouse to put some buttons,
images, and some text, and complile this as a HTML, this dont make you
a Server developer, and PHP have to do nothing with this.

To develop a Server, deal with security, make responses
base on headers, or queries, and many times this functionality,
must stay hidden for the user, for several reasons, privacy,
security, even if the author dont want to publish its code.
In this process the king is PHP, and i speak again about Servers,
not Sites' pages.

PHP is a scripting language that delivers HEADERS and HTML, nothing else.
Who is real developer, can do ANYTHING just with this.

Can you imagine, facebook, google, youtube, banks,
or other huge public sites, to base their functionality,
on something else than PHP, like client side javascript,
or server side NodeJS ?

We walk on dangerous paths, or not so secure one.
No matter what they say, privacy and security, is not the main concern
of the modern way of Web design.
If you want to do this, you must do this.

Collapse
 
dguhl profile image
D. Guhl

Third reason: Developers who claim PHP is dead often want to push their own language.

Collapse
 
midorikocak profile image
Midori Koçak • Edited

Hello, I translated your article into turkish here, medium.com/@midorikocak/2018-y%C4%... I hope it's not a problem. I could not ask in advance because I hurried and thought it should be heard from turkish audience as well. I hope it's not a problem. Thanks.

medium.com/@midorikocak/2018-y%C4%...

Collapse
 
mporam profile image
Mike Oram

Hey, no problem at all. Happy for my content to be shared around! Appreciate the translation and the attribution. If you wouldn't mind linking my name to my twitter or dev.to profile I'd appreciate that!

Collapse
 
midorikocak profile image
Midori Koçak

Thank you for permitting. I was afraid. I linked both profiles to your name and dev.to in the article. Also thanks for writing the article.

Thread Thread
 
mporam profile image
Mike Oram

Fab, thank you. Your welcome, thanks for reading it!