Difference between PHP and JS [duplicate]

I cannot at this point understand what is the difference between PHP and JS (the only thing that I got is that PHP runs from the server instead of the client side), why should we use JS when PHP will always hide the source code! I’m searching everywhere for this answer!, is PHP with HTML like JS with node.JS? Can you hide css elements in PHP so people will not copy it?Can you do everything in PHP what you can do in JS, if yes then why would a person use JS to expose the code through source code?

Tried to find the answer online, various answers but still no good analogy for me to understand