Recently I found a very interesting article about the comparison two programming languages: PHP vs Node.js. On author site we can read : “..PHP is not going to disappear immediately, but its positions are undermined even further by the nascent Node.js.
When the Internet exploded in the 2000s, PHP was a thing all the cool kids did. It was extremely revolutionary, because:
- It was an interpreted language unlike C++ or Java which require the source code compilation
- It had the ability to be used directly with HTML by mixing within its template files with a
<%php ... %>markup tags
- It had cheap shared hosting providers on Apache servers with a Linux, Apache, MySQL and PHP (LAMP) stack
- It had a functional nature which is easier to learn than the object-oriented programming
Over the years, PHP and its apps became a monstrous technology vulnerable to security threats (e.g., SQL injections), lack of a centralized packaging registry (was Composer inspired by Node Package Manager?), inconsistent API and subpar performance. There are many better alternatives to PHP, e.g., Ruby on Rails and Django, however nothing is as approachable as Node.js…” (source: http://webapplog.com/php-vs-node-js/)