New course! Every coder should learn Generative AI!
Try a free lesson+ 5
What is the difference between php and JavaScript?
4 Answers
+ 10
php used for server-side script or back end
js used for client-side script or front end
+ 6
Yes!!
+ 3
One of the main difference is that PHP is a server side language and Javascript a client side one
+ 3
PHP was originally intended to solve the issue of server-side scripting, while JavaScript was intended for the client-side. However, that gap no longer exists, and with something like NodeJS, JavaScript becomes both the client-side language, as well as a very powerful server-side language.
If you're debating, I'd go with NodeJS, but I'm a big fan of PHP also, and you can't go wrong with that either.