Is nodejs better than php for backend web development? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 14

Is nodejs better than php for backend web development?

I have seen that many web technology stack nowadays use nodejs for backend instead of php. Are there any advantages of using nodejs than php.

21st Apr 2017, 9:03 AM
Ismail Shaikh
Ismail Shaikh - avatar
10 Answers
+ 4
hey hi, I perfectly feel myself suitable to answer this question as I've started learning node.js and currently I'm an intermediate in PHP. Basically PHP is a back-end scripting language and Node.Js is a runtime environment that establishes a setup to run JavaScript outside browser. So what's advantageous therefore is that you can now have your own standalone web applications that aren't confined in your browser anymore. So, ultimately if it's a separate application that you're craving for Node.Js perfectly meets your needs whereas if you're only into developing the backend of your website then PHP is good I guess.
4th Jun 2017, 2:51 PM
Goutam Bose
Goutam Bose - avatar
+ 17
does it mean that nodejs doesn't need a server like Apache to run
4th Jun 2017, 2:53 PM
Ismail Shaikh
Ismail Shaikh - avatar
+ 17
thanks
4th Jun 2017, 3:00 PM
Ismail Shaikh
Ismail Shaikh - avatar
+ 6
Node.js is a framework that "request" to "Java" (mean that you can use function/class from java) But php....idk I didn't interest and forget all about it -_-
21st Apr 2017, 9:17 AM
Yanothai Chaitawat
Yanothai Chaitawat - avatar
+ 5
I my opinion PHP is best for back end.
21st Apr 2017, 12:49 PM
Nithin
Nithin - avatar
+ 4
@Ismail, go through a very good article on your question at http://vizteck.com/blog/node-js-vs-php-find-a-useful-comparison-for-your-next-startup/
21st Apr 2017, 12:03 PM
देवेंद्र महाजन (Devender)
देवेंद्र महाजन (Devender) - avatar
+ 2
no you can listen to a fixed ip for example your localhost without using any extra setup like xampp for Windows or apache in case of linux that creates a separate server side for your machine
4th Jun 2017, 2:58 PM
Goutam Bose
Goutam Bose - avatar
+ 2
Always welcome
4th Jun 2017, 3:06 PM
Goutam Bose
Goutam Bose - avatar
+ 2
nodejs
4th Jun 2017, 4:02 PM
Марат Нагаев
Марат Нагаев - avatar
+ 1
most of the CMS websites like Drupal,WordPress,etc still supports PHP so I personally feel it's a better choice
4th Jun 2017, 3:11 PM
Goutam Bose
Goutam Bose - avatar