PHP or Javascript Which one is better

Hello All, I am exploring some new things which I am confused to choose between PHP and Javascript in terms of concurrency and database access. I have talked to my friends most of them suggest PHP is better than javascript but I am confused about what can PHP do that JavaScript cannot? Can anyone tell me which one is better for web development?

1 Like

It all depends on what your use case is.

  1. Do you want to write a server within a week - node js.
  2. Do you want to write a server which can be used for enterprise level applications, java is my choice.
  • nodeJs poses certain problems when you want to scale it up , this is what developers call it as steep learning curve. Initially it is colourful but later it might look like maze.
    Node js is best for asynchronus programming like handling web notification (instagram uses node js for notifications)

  • PHP , I am not that experienced in php but it is crazy.
    It has better online footprint, better community something which node js lacks.

  • Java, almost all present enterprise applications are running on Java. It is somewhat opposite to nodejs,
    it has one excellent framework with name Spring, it will take time to learn but once you get a hang of it you will never see a maze.

You might say node js is easier to learn, java is harder or PHP is faster etc etc etc. At the end of the day an application which runs without any problem is what everyone wants, no one cares if it is java, node js, php, c\c++ , so pick one. My choice would be node js if you are a student working on a college project, JAVA if you wanted to create a customer application.

Above analogy is from my own experience with different stacks. You are free to use any language even C language.

Best
Abhilash

Sorry I almost forgot , you can make use of this post made by the great :wink: @sainithin MVC Framework for Nodejs

According to me, JavaScript is better than PHP. The greatest advantage of JavaScript** over PHP lies in the fact that JavaScript is a full-stack development language. Most JS vs PHP comparisons emphasize that JavaScript is front end only, but that is simply not true. You can develop an entire web or mobile app with no other technology than JavaScript

2 Likes