Author Jani Hartikainen published a blog post, which compares the two to illustrate the five reasons PHP is better than node. js. Look at it together.
1. Easy to host
Most web hosting server providers can host PHP, and for node, you need to find a more professional hosting service provider. Typically, you need to set up your application through shell access, and most hosting providers do not include these, and even if they contain this functionality, the other packages are relatively inexpensive.
2. PHP is more convenient and easy to install on the server
PHP can easily install Wamp,lamp or mamp, deploy the code to a web hosting, just drag and drop files, you can do it.
Although node itself is not difficult to install, it needs more expertise to set it up, and in order to be able to install on the server, you usually need to know some Linux system administrators so that you can make sure node works well during the installation process when the system crashes.
3. If the PHP code is corrupted, the entire server will not be dragged down
PHP code only runs in its own process scope, and when a request displays an error, it only has an impact on a particular request. In the node environment, all requests are in a single process server, and when a request causes an unknown error, the entire server is affected.
4. The PHP process is short
Each process in PHP has a short duration for the request, which means you don't have to worry about resource configuration and memory. While node needs to run for a long time during the process, you need to be careful and properly manage the memory. For example, if you forget to delete an entry from the global data, it can easily cause you to leak memory.
5. A larger standard library
PHP's standard cubby node's standard library is much larger.
Conclusion:
Of course, not that PHP is better than node in every way, and in some things, node is very good (for example, information processing in real time), node is an interesting product, it has an elegant architecture. Although node. js is not a silver bullet, it is still a bullet.
Developers of programming language preferences are always the same, each language has its existence value, I think the choice of their most suitable is the most important. In addition to these, what is PHP better than node? You are welcome to list in the comments.
http://www.bkjia.com/PHPjc/325985.html www.bkjia.com true http://www.bkjia.com/PHPjc/325985.html techarticle author Jani Hartikainen published a blog post, which compares the two to illustrate the five reasons PHP is better than node. js. Look at it together. 1. Easy to host most web hosting servers to mention ...