DEV Community

Cover image for The Snobby Demonization of PHP
Adam Nathaniel Davis
Adam Nathaniel Davis

Posted on • Updated on • Originally published at

The Snobby Demonization of PHP

I'm probably older than you. My beard is grey. My experience is long. I've had the chance to witness many coding trends over the last 20+ years. I've seen languages come into vogue (looking at you, Ruby), and I've seen some of those same languages become vilified (looking at you, ColdFusion). So it's been kinda curious to me to see how PHP is currently treated in the marketplace (and has been treated for quite some time).

The First "Web" Language

I started throwing up web pages in 1995 (yeah... I'm that old). My first website was hosted on Geocities (yeah... I'm that old). By 1998, I was frustrated by the limitations of the "static" web and I was already looking for other solutions. Wayyyy back then, your options for creating a truly-dynamic website were extremely limited. In fact, when I first got into this game, I had only two options: Perl or PHP.

To be clear, I have a lot of respect for Perl. It's a fine language. And, in some respects, it stills fills a valid niche on the "modern" web. But back in the 90s, Perl could be extremely problematic. Because back in the 90s, hosting providers hadn't yet figured out how to properly deploy containerized, virtualized environments. (In fact, the first hosting company that I used in 1998 was one of the first hosting companies on the web to offer virtual hosts).

Back in these "bad ol' days", most of the shared-hosting providers gave you only two options:

  1. You could create a completely-static site by uploading your completely-static HTML files into their shared-hosting environment.

  2. Or you could create dynamic code, driven by Perl, that would be executed in the cgi-bin... but, before your code could be deployed, you had to pay the hosting provider an hourly fee to review your code before they would allow it be uploaded to your cgi-bin folder. (This onerous - and expensive - restriction was completely understandable. Because they didn't have the virtualization tools to properly "wall off" your site from the others in the shared host. So if you wrote some really crappy code, you could destroy not just your own site, but every other site in the shared-host's directory.)

So... with the help of virtualization, PHP became possibly the first programming language that was readily offered to the masses to create dynamic web pages. Because once virtualization gained a solid foothold, a lotta folks who were signing up for their first virtual hosting environment found that the "server" came preinstalled with PHP (and the embryonic beginnings of MySQL).

Now I understand that if we're to adhere strictly to literal timelines, Perl preceded PHP - by a good bit. But I would stridently argue that PHP was the first "truly-internet" language that fostered widespread adoption of dynamic HTML. To put it another way: The first "script kiddies" didn't cut their teeth on Perl. They got their feet wet in PHP.

So I dove in. Somehow... I made it work. I wrote a crap-ton of thoroughly-embarrassing code. But somehow, some way, I managed to make it all "work" at the time.

Evolving Past PHP

Of course, the interwebs constantly evolve. And as they did, PHP became more of an embarrassing side-note for any of the "real" programmers. We got JSP (which is, honestly, a complete shit-storm in its own right). We got JavaScript - but back then, JavaScript couldn't really do anything useful. We got other server-side scripting tools, like (the forever-dying language of) ColdFusion. Eventually, we even advanced to the point where we could write "real" enterprise-level apps, first in Java - then in C# - that would make the haughty OOP crowd nod in approval. But along the way, a funny thing happened. PHP never really went away. It just kinda... lingered in the amateurish shadows - refusing to die, but refusing to properly evolve.

Even the largest PHP fan will probably admit that its resilience is, in large part, attributable to WordPress. The WordPress team chose PHP - and, in turn, that fortuitous decision solidified a permanent place for PHP in web-development lore. Whether any of the "real" programmers wanna admit it or not.

We've all seen the web statistics to back it up. At any given time, there's an insanely-disproportionate number of public sites that are running on PHP. Of course, those "in the know" understand that those statistics are massively skewed by the bloggers and other amateurs' sites which are, technically, running on PHP (because the sites are built in WordPress) - even if the sites' webmasters (yeah... remember that term?) couldn't write a line of PHP to save their life.

Personal Evolution

Given my (long, greybeard) history, you can probably guess that I too have "evolved" beyond PHP. I moved to ColdFusion/MS-SQL, then to Java/Oracle, then to ASP/C#/MS-SQL, then to jQuery/Knockout/Angular/React. Like most people who are in the "long game" of app-dev, I've managed to get my grimy fingers into a stunning array of technologies - even if I'm still struggling to master any of them.

But I never really quit PHP. It's been installed on my local machines for decades. I've rarely ever been paid to write PHP - because, let's face it, most of the PHP jobs out there just don't pay. (Do I want to be your WordPress Administrator for $50k/year?? Umm... no.) But it's been an invaluable tool for those (many) times when I want to write some quick coding utility at home. Even as I've moved ever deeper into frontend development, I find myself often reaching for PHP because it's a quick-and-easy way to spin up a backend API.

The Shaming of PHP

Even though I still write some PHP in my spare time, I've known for a loooong time that being a PHP dev is usually best kept as a type of "dirty little secret". You can do PHP, but you should only do it when you're at home. Alone. With all the blinds closed. And for godsake, no matter what you do, never tell anyone that you actually write (and - egads! - enjoy) PHP. It's like the fetish porn of software development. There are plenty of people out there doing it, but if you wanna be accepted and respected by the "real" developers out there, you'd best keep that shit to yourself.

This point was driven home to me recently during two incidents when I was involved in a job search.

  1. I was interviewing for a React position and I was doing a screensharing coding test with two of the company's senior devs observing my actions. When they gave me the instructions, I launched my IDE - JetBrains' PHPStorm. One of their devs immediately exclaimed, "PHP Storm???" He sounded like I'd just proposed scrawling the answers to their coding test directly on my monitors - in feces.

    His exclamation was quite silly. I wasn't going to write any of the answers to their coding test in PHP. I wasn't going to run any of my completed code in PHP. I was only using an IDE that had "PHP" in the name. And this was enough to give this guy the creeps. (If you're wondering: I pay for the full JetBrains suite and I actually could have opened Web storm, which presumably woulda made this guy much happier. But I didn't have Webstorm configured locally and when you're in an interview, you don't have much time.)

    They did not offer me a job.

  2. I was completing a coding assignment with all kindsa hairy requirements - far more than you would normally find in a coding assignment of "acceptable" length. Nevertheless, I did the entire assignment. It had a React frontend, with authentication, and drag-n-drop, and GraphQL, and session management, and... a whole buncha crap that was wayyyyy more than any reasonable employer should ever ask for a coding assessment. But I did it anyway. I met every requirement.

    Some time after I submitted the code, I learned that they didn't like my submission because I built the backend API... in PHP. Their requirements never said which tools should be used to build the API. They didn't say that I must use any particular tech stack. They didn't say that I couldn't use PHP. They just said that I had to include a GraphQL API. And I did that... in PHP. I did it in PHP because it was the fastest, easiest way to spin up an API with my local tools. I did it in PHP because I had already sunk a huge amount of time into the frontend functionality and I just needed a backend that worked. Nevertheless... they didn't like the fact that I'd used PHP to build the backend of this silly demo app.

    They did not offer me a job.

Not that any of this really shocks me much. I've already known, for many years, that when I'm talking to other senior software engineers - in "real" jobs - that even mentioning PHP is a liability. You can be having a great conversation with a bunch of serious coders. And you can all be getting along fabulously. But if you let "PHP" escape from your lips, everyone gives you that awkward look like you just dropped an off-color joke on the group.

A (Deservedly) Bad Reputation

If this sounds like some whiny defense of the language, believe me, it's not. I've been around PHP long enough to sorta regard it as my kid. My ugly overweight kid who never did much in school, has been working dead-end jobs for years, and has had numerous run-ins with the law. You still love your kid. You still hope for nothing but the best for your kid. But after a certain time, even the most devout parent's gotta see when their kid has some... problems.

The 3.x versions of PHP were too experimental to critique. And most coders today have never actually seen a 3.x installation of PHP.

The 4.x versions were, in retrospect, a disaster. Much of the language's scorn arises from the 4.x versions. Magic globals, crappy database constructs, conflicting libraries, inconsistent syntax. All the warts were right there in the open for anyone to see.

The 5.x versions did, incrementally, improve the language. Granted, the road through the 5.x versions was far too long, and PHP's Release Candidate community seemed to bog down for quite a while. But they did, eventually, get through that wilderness.

The 7.x versions are... pretty damn good. There. I said it. You can laugh at me if you want. Have they fixed every potential headache in the language?? Of course not. But what language doesn't have at least some quirks that drive its developers nuts? But overall, I really kinda... enjoy writing backend functionality in PHP 7.x.

Of course, many of the knocks against PHP don't come directly from the language itself. They come from the community that's associated with its use. Specifically, many of PHP's haters have been jaded by the droves of hobbyists and dabblers that come along with WordPress. WordPress itself can be a Coding Beast From Hell. And then when you add in all the weekend warriors who are mucking it up because they're just trying to put up a basic site for their kid's soccer league? Well... you can run into some really amateur stuff. Stuff that gets indiscriminately painted with the broad brush of PHP.

The Irony of the JavaScript Code Shamers

There will always be people who (irrationally) love their chosen language and (irrationally) hate your chosen language. I get that. It's an attitude that's as old as programming itself. But I can't help but notice the particular irony of JavaScript programmers looking down their noses at PHP.

For the first 10+ years of JavaScript's existence, it was little more than a programming toy. There wasn't much of value that you could actually do with it. And even when you figured out how to create something meaningful from it, most of the "real" coders dismissed it entirely. For many years, being a "JavaScript programmer" was seen as a contradiction in terms, like "jumbo shrimp" or "compassionate conservative".

So it's quite rich, nowadays, to see the blatant snobbery with which many JS devs heap scorn upon PHP. They obviously have no sense of coding history - or irony. Quite frankly, I don't think they care. The JS community has, over the last decade, become increasingly elitist, and this can really be highlighted when you observe their overall attitude toward PHP. Few of the JS devs I've met fully grasp the incongruity at play when the JS community tries to treat PHP like it's somehow "lesser", while acting as though JS is somehow "greater".

Coding in the Shadows

So what's the "answer" for PHP devs? Sadly, I don't know if there is much of one. Trying to shift the attitudes of many thousands of JS/Java/C#/Python/etc devs is probably impossible. Any chance to radically improve the language's "social standing" probably passed a long time ago. Not that I'm telling you to abandon PHP. It's a great tool (for certain jobs). There's nothing "wrong" with having that tool in your tool belt. But... you might want to make sure that it's tucked deep into a pocket where no one else is likely to catch you with it.

Top comments (18)

jmfayard profile image
Jean-Michel (

Happy to share part of the 'shame': I built microservices in PHP and it was fine.

IMHO people should learn to give less fucks about the "right" way to build things and much more fucks about building the right thing.

Wikipedia for example is just a CRUD app built with PHP/MySQL. that's bad right?

bytebodger profile image
Adam Nathaniel Davis

(As you can probably already tell by my post) I completely agree with you. Of course, my post wasn't meant to say that PHP is crap. Rather, too many in the dev community (in the US, at least), seem to have adopted the viewpoint that PHP is a "script kiddie" language. So much so that it can actually be a liability to even mention PHP if you're in a job interview for any position that doesn't specifically call for PHP.

jmfayard profile image
Jean-Michel ( • Edited

i agree with you and I would
1) make a list of the most famous devs that built great things with PHP and ask the snobs whether they really think that they are smarter than those guys
2) treat this snobism as a red flag that I don't want to work here

Seriously it's not even about PHP

$LANGUAGE shaming *people" is stupid no matter what $LANGUAGE is currently hyped or not. Good people should try hard to not be that guy.

stojakovic99 profile image
Nikola Stojaković

Well, it's much more than a simple CRUD app. Pretty much every web application out there is on the basic level CRUD, but there are many functionalities beside that.

tomfern profile image
Tomas Fernandez

On my first internship they put me to write PHP, which I had never encountered before. Also, it was my first time doing web development. I think I learned the language in record time and did a passable job. I don't think I could have done with any other language at the time. PHP was pretty intuitive and easy to use. Whatever purist may say, PHP will always have a place in my heart.

bytebodger profile image
Adam Nathaniel Davis

I've been through "the good times and the bad" with PHP. It was the first web-based language I ever learned. And as someone who programs almost exclusively in the web realm, it kinda holds a place in my heart akin to my first love. When I first started using it (in the late 90s), you basically had two choices for web development - PHP or Perl. I'm sure I woulda done just fine learning Perl. But instead, I got on the PHP train, so my biases are set.

I'll freely admit that PHP's earned many of the arrows that are slung its way. 3.x was... embryonic. 4.x was a mess. 5.x was like watching a massive team of dike engineers working to improve the structure - but previous neglect was so great that they could barely keep ahead of the leaks.

FWIW, I think 7.x is actually... pretty damn good. I literally enjoy coding in 7.x. However, I'm rarely tempted to actually write much in PHP anymore because almost all my development has shifted to JS, which I can do for frontend (React) or backend (Node).

Still... I have WAMP installed on my local machine and there are numerous times when I go back to tinkering with PHP scripts.

matronator profile image

I'd be interested to read your opinion about PHP 8.x. Care to share?

Thread Thread
bytebodger profile image
Adam Nathaniel Davis

The first major caveat here is that, while I wrote gobs of PHP code for more than twenty years, it's only in the last several years that it's finally fallen almost entirely out of my toolbox. In general, I just don't have much use anymore for server-side scripting - in any language. So I can't claim to have written a single line of PHP 8.x code.

That being said, the list of new features added in the 8.x releases is... awesome. For example, if you look at the 8.x release page, almost every one of those features is, IMHO, a MASSIVE improvement, and they would make the language far more viable if I have the need again to reach for a server-side scripting language.

Thread Thread
matronator profile image

Ah, I see, that's a shame. Or probably not, but you know what I mean 😅.

My experience with PHP 8 has been amazing, it's really on the right track to being considered a "worthy" backend language with the likes of C# etc (or at least Go or Python). One thing that still kinda brings it down are the messy built-in functions with inconsistent naming and parameter ordering that are kept unchanged to not majorly break backwards compatibility. I hope they would decide to finally sort it out some day, but I'm afraid that day will never come.

But definitely when you are ever in need of some server-side coding and have the opportunity, give it a try. It's almost a whole new language now from what it was back in 5.x and you'll be pleasantly surprised 😉

Thread Thread
bytebodger profile image
Adam Nathaniel Davis

Absolutely. Honestly, 7.x was a quantum leap in itself. And I greatly preferred using 7.x over any of it's predecessors. But yeah, 8.x looks to be even better - by leaps and bounds.

jankapunkt profile image
Jan Küster

If a language has really issues or becomes useless it will actually disappear (see flash, which I really enjoyed to develop using the Flex framework).

However, I see both php and Js as languages growing and in a positive way. (Not comparable to the frameworks that are growing too fast and hype driven, mature tech gets labeled as dead etc.).

bytebodger profile image
Adam Nathaniel Davis • Edited

I don't totally agree with this - because once a language reaches a certain "critical mass" of installed legacy codebases, it will tend to live, in some capacity, nearly forever. Flash died because there were almost no business applications that truly depended upon it. The vast majority of stuff written in it was for fluff-presentation - or entertainment. And that stuff can all be "turned off" if The Powers That Be deem it so. (By the way - I too did Flex dev - and I loved it. Sigh...)

But if your point is just that PHP isn't truly "dying" in any substantive sense, and thus it will never really "go away", then I completely agree with you. There are too many huge legacy systems (WordPress, Wikipedia, etc.) for it to ever truly DIE.

I also agree that PHP is growing and it's growing in a very positive way. But many in the dev community do not "see" it this way. And even though it IS growing, it's not growing at the same rate as JS. When I say "growing", I don't mean just the number of new LoC that are being written in it every year. I'm referring more to the rate at which new advancements are being made in the language. In this regard, JS seems to be lapping the field, IMHO.

Finally, seeing some of the early comments on this post, I realize that my viewpoint is very US-centric. I have noticed that PHP isn't quite the pariah in other countries that it is in the US. Outside the US, there are still plenty of people who see PHP as a viable language to learn and to use for new applications. In the US, I feel like this viewpoint is much different amongst the "senior developer" crowd.

luiz0x29a profile image
Real AI

ActionScript didn't disappear because it had issues.
Steve Jobs shamed it out of existence.
He should have done that to PHP, I've personally wrote to him when he was still alive, but killing PHP wasn't in his business plans. PHP was harmless he said.

valentinprgnd profile image
Valentin Prugnaud 🦊

I love PHP as well, but lately I have been using JavaScript myself, simply because it is easier and faster to “containerize”.

Having a strong, production-ready, light built-in server in PHP would be nice though and avoid having to deal with Apache/nginx/Caddy sidecars containers.

bytebodger profile image
Adam Nathaniel Davis

To be absolutely clear, I have been veering heavily toward JS lately. And I've been loving it. I don't have anything against JS. And I don't have anything (irrationally) in favor of PHP. To me... any language is a tool in your tool belt. And it's silly to imply that the hammer is somehow superior to the screwdriver.

kwstannard profile image
Kelly Stannard

I will admit I have a kneejerk reaction to PHP. My first job had a few people move off of an old PHP codebase to work on the new application and they would regularly complain about PHP. I then took a look at some PHP service's code and it was all procedural with global variables and whatnot. I have to remind myself that facebook is PHP and I probably just had an unlucky experience.

afterdiv profile image

I love my personal homepages - using jQuery and css. Together they can make a great CMS tool and site. WordPress is simply an out of control template relying on compiled new and old components that don't work well with each other. I've never used a wp template because I'm a front end developer.

There is no shame in using any code language or markup language period. As long as the developer understand how it works and they can fix it, then they are a developer. People who use WordPress template are not developers.

Thank You!