How to update to the latest version of PHP in cPanel
Simply go to
WHM » Software » Apache Update, select required PHP version and additional options (if needed), uncheck the "Skip Apache Build if up to date" option and click "Start to Build" button. This whole procedure will take less of 30 minutes to complete.