Basically, XAMPP built for specific PHP version to ensure all supported library work correctly.
So the best method to move PHP from 5 to 7 is download latest XAMPP, use given the link
Download XAMPP
The same method is applicable to the following versions
Downgrade PHP 5.5 to 5.3
Upgrade 5.6.40 to 7.1.26
Upgrade 5.6.40 to 7.2.14
Upgrade 5.6.40 to 7.3.1