how to update php version in xampp code example
Example: update php version in xampp
Take a backup of your htdocs and data folder (subfolder of MySQL folder), reinstall upgraded version and replace those folders.
Note: In case you have changed config files like PHP (php.ini), Apache (httpd.conf) or any other, please take back up of those files as well and replace them with newly installed version.