DEV Community

Discussion on: Node vs PHP

Collapse
 
peon501 profile image
Matas Lesinskas • Edited

In short it depends. Use node.js if you work with real-time socket io app, event based system or with multiple threads.
That might be simpler than trying to achieve something like that in php.
On another hand php let's you write really nice run and exit programs faster. Also with php it's really nice to work in oop and with variables, because you don't need to handle undefined, null and other similar problems. Also I like php arrays and JavaScript fuckery kind of sucks.

Overall I use php on large projects where I need stable and secure system.

Node.js is kind of new and still you can't trust it on Enterprise level.

If you read somewhere that php is insecure it's wrong. People who never worked in php and back end wrote it or they are just script kiddes who used old WordPress and got spam and viruses inserted. Tho we can all agree WordPress is trash. Why they still use plain php for templates? Lol.