Here is how to upgrade it:
Login to cPanel and choose SOFTWARE > Select PHP Version.
This will display the current PHP version and the PHP versions that can be used. If there is an old PHP version, then it’s better to upgrade it to the latest version by selecting it from the menu. Click on Set as current for the changes to take place.
The PHP version will now be changed as selected.