Each script or piece of code that you enter on your site has some requirements to meet to execute properly. The PHP version is one of the factors. Updating your PHP to the latest version will not only help run your commands smoothly, but it will also increase your site’s loading speed, performance, and security.
To easily change the PHP version on the CPanel:
1 – Login to your cpanel
2- In the SOFTWARE section of the cPanel home screen, click Select PHP Version:
3- cPanel displays the current PHP version. To change the PHP version, in the PHP Version list box, select the version that you want to use,
4 – and then click Set as current:
5 – The new PHP version takes effect immediately.