The most common arguments by developers that I consistently hear for node.js is that it is super fast, that iT can run multiple processes independently from one another, that it is event driven and that you can write the frontend code and the backend code in the same language.
Now while these are advantages, this is why I do the majority of my programming in PHP.
- Node.js applications integrate deeply into the environment through the npm package manager & other, which node.js applications are dependent on for productivity .This means that portability and complexity is significantly increased
- Facebook is built on PHP, HHVM and compiled PHP. Facebook is the second most highly trafficked website in the world.
- Node.js is only about 10 years old and only 2 percent of developers use it for web development compared to almost 79 percent of developers who use PHP. PHP is not a young language which means that the community is huge and it is incredibly easy to find a framework or a code snippet that works for you as most PHP code from PHP 5 onwards still works with the latest versions of PHP. Most PHP legacy code from 15 years ago can still be used today and with minor tweeks, it works beautifully. What is quite interesting is that thanks to WordPress PHP has actually remained steady in terms of market share even though most would like you to believe that it has lost market share to node.js
It is also important to note that while PHP does not support nonblocking io like node js, it uses all of the cores on the server unlike node.js which only uses 1 core , which is why companies such as facebook continue to use PHP instead of node.js as it is more stable with high volumes of traffic then node.js