DEV Community

Cover image for PHP vs Node?
Muhammad
Muhammad

Posted on

PHP vs Node?

I have done quite many projects with clients in PHP, but now I have moved away from PHP to Node.

I would like to know what do you guys have to say about it.

My Opinion About PHP

It is a great powerful language to make your programming concepts very clear and how your code will translate, the language is based on original core concepts and as a beginner, i do highly recommend it.

Node

Very Fast, Highly performative, a bit complex for beginners, and it has its own new concepts to embark upon. It is a versatile language and i think the demand for todays market.

Latest comments (52)

Collapse
 
jdsllk7 profile image
Kosamu

I'm a 2 year old Node.js dev & a 5 year old Php dev. I think what makes a good programming language is it's ability to attract programmers & consequently make them stay.
That's Node.js for me.
Note: learning node.js from a php background is challenging @ first because it has somewhat completely new concepts but once you get the hang of it you'll realize there's a module for almost anything you want.

Collapse
 
akshatjen profile image
AJ

Any Go developers having a laugh here?? xD

Collapse
 
kalium profile image
kalium.xyz

Node is great for prototyping any type of application, PHP is great for templates.

You might have wrongly tagged this with #docker though its good advice to run your projects inside containers as there have been some trojans in NPM packages which won't be very effective when running in a container. if you use node please make sure you know who made your dependencies and transient dependencies, you are trusting them! Also always set your dependencies to fixed versions and use package-lock.json!

Collapse
 
donnisnoni profile image
Don Alfons Nisnoni • Edited

I agree with you... but i tired press $ on keyboard for variable... unless you...

and you got lot of discussion when you try make post about 'node vs php'

 
vicoerv profile image
Vico

hello, thank you for make it clear

as you can see here

<VirtualHost *:80>
    ProxyPreserveHost On

    ProxyPass / http://127.0.0.1:3000/
    ProxyPassReverse / http://127.0.0.1:3000/
</VirtualHost>

it only run one service, my company is SaaS so probably in one vps there will be tens of different project and to run different project with manual port handling will take more time

Collapse
 
muhamadzolfaghari profile image
muhamad zolfaghari • Edited

NodeJS. VS Poorly Heat Pattern!
Null or defines equal VS PHP

 
xowap profile image
Rémy 🤖

Oh well, I assumed that frameworks would make sure that req.param('name') is a valid unicode string while $_GET['name'] can be any string of bytes but maybe I'm expecting too much?

In any case, you can write stupid code in all languages. But to be specific to the $_GET issue, it's so easy to break encapsulation using it (because it's global). Same thing with $_REQUEST, what is the point of this except getting X-whatever-scripting attacks from all sides?

PHP is just next-level compared to anything else in terms of possible misuses.

 
th3n00bc0d3r profile image
Muhammad

Lolx rules are rules we didnt make em so we gotta follow em... I think what you might be embarking is creation if a new language above a language...

The evolution of assembly to java and beyond now

Thread Thread
 
xowap profile image
Rémy 🤖

Yes, although it's mostly a front-end issue. On the back-end if you try to access DB data in a non-async way you'll quickly realize that the data is simply not there. I've been handed large amounts of amateur JS and there was MANY issue but not really that one.

The kind of issues that PHP enables are more like "let's execute this unfiltered user input" which is way more dramatic than a randomly-bugged front-end component.

Collapse
 
th3n00bc0d3r profile image
Muhammad

I agree but what can you say... Its just how it goes and how it has gone with perception

 
th3n00bc0d3r profile image
Muhammad

Thanks for the response Jorge, i dorecommended pm2 because if the process fails of some error it just restarts it. Hope you'd agree