DEV Community

Discussion on: Three reasons I like PHP more than Modern Javascript

 
tonipetre_13 profile image
tonipetre

You're talking about node.js as if it is another language and php just works on thin air. And you compare bananas with carrots.

Let me put it this way. With php you can control only bananas. With javascript you can control both banana and carrots.

Thread Thread
 
roelofjanelsinga profile image
Roelof Jan Elsinga

I don't think I've explained myself correctly because that's not what I mean. Let me try again.

PHP doesn't run on thin air and I never meant to suggest that it does. It runs on a server than I can configure and I can control exactly which software packages should be installed.

I understand why you think that I'm saying Node.js is completely different from JavaScript. Of course, it's all just JavaScript and it's not different at all. The reason that I mentioned it, is that it's the way to run JavaScript on the server and that's why I'm only comparing Node.js to PHP because they both only run on the server. PHP can't be compared to client-side Javascript. As you said, they're apples and oranges.

JavaScript is much more versatile and you can do a lot more with it than PHP. It's great on the server and also on the client.

PHP is only on the server. I personally like this much better because I can control everything about the server, which means I control everything that's going on. I like the control, but this doesn't mean it's clearly better than JavaScript. Just because I like control doesn't mean I urge others to only use PHP. Use the right tool for the job.

I'm not saying in any way that PHP is better than JavaScript. They're both great, I use them both with great joy. So I completely agree with you that they're not completely comparable and only compare on one aspect, the server.

I was initially only thinking of JavaScript on the client-side, which is why my point of view might have been very confusing. Apologies for this confusion.

These are all my own preferences and I'm not implying that one is better than the other and therefore everyone should pick one over the other.

I hope this explains my point of view a little bit better. Just know that I completely agree with your comment about the banana and the carrots, you're right.