The short answer is: don’t do this.
XAMPP is built around a version of PHP to ensure that everything that comes as it works properly. The most appropriate would be to search for a "new" version of it with the PHP version you want here. (I’m assuming you’re in windows environment)
KICK: If you really want to keep your version of XAMPP, and change only the version of PHP, I think that you can download the binaries that you want here, and change them in the PHP folder that is probably in C:\xampp\php
, and then change their settings accordingly, but I confess that this should bring more problems than solutions, if it actually works. My advice is to download a stable corresponding (XAMPP) version.
If there are mistakes, correct them.. What you want to do is sweep dirt under the carpet.. Depending on the types of errors, such as "Warning errors" or "deprecated error", it is possible to configure at runtime
ini_set('error_reporting', E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);
– Daniel Omine
Do not use deprecated functions!
– rray