It depends on type of the WEB you build (website, web application, web service ...).
If you are going to build web services you should switch to NodeJS or Ruby as fast as you can.
You still can do web applications with PHP but it is recommended to switch to something else.
It will depend also on your hosting platform (few hosting providers offers something else than PHP), you may require VPC or docker to run your NodeJS/Ruby apps.
Generally it is a good idea to learn something else, but ultimately is related to your actual "market" or what do you sell.
If you will need to chose something else, take a look at NodeJS and Angular or React.