Login to your cPanel. Under Software, click on Select PHP Version. In the PHP Version pulldown menu, select your desired version and click on Set as current. Now, all your PHP scripts will run with your chosen version.