📅  最后修改于: 2020-12-24 10:13:38             🧑  作者: Mango
Index | Node.js | PHP |
---|---|---|
1. | Node.js was created by Ryan Dahl in 2009 so it is comparatively new. | PHP was created by Rasmus Lerdorf in 1994. So it has a glorious history of 20+ years. |
2. | Node.js is not a programming language itself. It is a platform which runs JavaScript on server side and come with some set of JavaScript functions, modules, helpers etc. | PHP is a programming language, used to develop web applications.. |
3. | Node.js uses Google’s V8 JavaScript engine, which also powers client-side code in the chrome web browser.node.js platform. It has built-in libraries to handle web requests and responses so you don?t need a separate web server or other dependencies. | PHP is processed by an interpreter normally installed as a module in a web server i.e. Apache or Nginx. |
4. | Node.js provides a wide range of new plugins that are designed according to the modern architectural approach. | PHP is a simple and thin layer language with less variables and certain elementary functions. It is not good for lengthy and complex architectural website. |
尽管Node.js和PHP都是开源的,主要用于Web开发,但是它们具有一些独特的功能。在某些方面,前者更好,而在某些方面,后者更好。