it depends on what you will be doing whether you need js or php first, but I would say js is more places. Learning js will, with minimal effort, also get you coffeescript and typescript.
@thndrbvr Here are a few, most have a free option. Do you want to learn front or back end? PHP is both and javascript is mostly front end as it runs in the browser.
@musicman @geniusmusing That’s mostly #Node.js, which is a somewhat outdated fork of Chrome’s V8 engine. Considering that the browser is the least secure part of modern computers, and the #JavaScript engine is a key part of that insecurity, it is up to each person to decide whether to accept the risk.
Personally, I’m willing to accept Node, but only in a completely separate VM or VPS from other server-side software. Which explains why I never have hosted a Pump.io instance.
npm has certainly had its problems in the past, but OpenJS is now part of the Linux Foundation. I think they know what they are doing: https://openjsf.org/