PHP vs. Node & Why It Doesn’t Matter

March 24, 2015

Blog | Development | PHP vs. Node & Why It Doesn’t Matter
PHP vs. Node & Why It Doesn’t Matter

I came across an article titled, “PHP vs. Node.js: An epic battle for developer mind share and it made me scratch my head. I like that people are talking about developer mind share, because it can really impact the quality of tools and end results from a given platform.  But posts like “this tool is better than that” don’t help developers choose the right tools for the right job, or help clients understand the big picture.



PHP came out in the mid-1990s, as did the JavaScript language, upon which Node.js is built.  Node is only a few years old, but it’s still fundamentally JavaScript on the server.  Both tools are about 20 years old, but have radically different histories – in part because they were built to solve different problems.  20 years is a long time in computing, and the problems PHP and JavaScript were built to solve have changed, a lot.

The Mainframe is Dead

]Back in the bad old days of computing, computers were so expensive that it made sense to have one really big computer with many “dumb” terminals.  The big computer, the mainframe, did almost all the work.  When personal computers and the Internet took off, it shook that model to the core; PHP was part of that vanguard.  Suddenly, users were sitting at powerful workstations instead of dumb terminals, and the role of the mainframe became one of dishing out content (called HTML) instead of the entire application.  The web browser was the application, and PHP was a great tool to deliver content to it.

Since then, a bevy of languages and platforms sprung up to compete in the content-delivery space: Active Server Pages, Java Server Pages, CGI, and Cold Fusion to name a few.  JavaScript appeared at about the same time, but it was a bolt-on feature to the Netscape browser.  However, it’s job was not content delivery; it was designed to add interactivity to the delivered content – animations, button clicks, image pre-loaders…  in the grand scheme of things, these were parlor tricks compared to the stuff happening back on the server.

Why it Doesn’t Matter

In short: every language sucks.  Except when it’s used for its intended purpose.  Comparing tools designed to do different jobs doesn’t help anyone – and Node.js isn’t designed to shuttle HTML content from the server to the web browser.  It can, quite well in fact.  But that’s not what it’s good for.  Node was written to be a lightweight network services tool.  It was conceived for fast processing of discrete network messages.  However, it gets lumped in with web development technologies because that’s basically what a web server does.  It’s just that Node is so much more than a web server.

Node can serve up HTML, or it can serve up data, or provide an API for managing a network or data center.  It can scrape websites or process files… it’s a nice tool for doing behind-the scenes work.  All that is to say: it’s not a direct competitor to PHP.

I’ve written about using Node as a development tool, and using the power of its built-in package manager, build tools, and automation strategies.  I’ve also written about how JavaScript is really taking center stage as a development tool these days.  

I really like JavaScript, but I also really like PHP.  It’s given us amazing tools like WordPress, Drupal, and countless others. It set the bar high. There aren’t any Node.js content management systems that hold a candle to the venerable stable that PHP boasts.

And that’s completely ok – for both languages.

Dan Clouse

Senior Developer
  • Node.js
  • PHP

Recent Work

Check out what else we've been working on