PHP vs NodeJS
Where to use Nodejs and PHP
Here are some quick examples of different programming situations and which language you should probably go with.
- Are you building some sort of daemon? Use Node.
- Are you making a content website? Use PHP.
- Do you want to share data between visitors? Use Node.
- Are you a beginner looking to make a quick website? Use PHP.
- Are you going to run a bunch of code in parallel? Use Node.
- Are you writing software for clients to run on shared hosts? Use PHP.
- Do you want push events from the server to the client using websockets? Use Node.
- Does your team already know PHP? Use PHP.
- Does your team already know frontend JavaScript? Node would be easier to learn.
- Are you building a command line script? Both work.
Courtesy :- http://thomashunter.name/blog/php-vs-nodejs/