This tutorial provides the steps you need to upgrade from PHP 7 version to PHP 8 in Xampp
Step 1. Get php 8 folder
Go to this link https://sourceforge.net/projects/xampp/ and download the zip file which at the time of this tutorial is /XAMPP Windows/8.0.11/xampp-portable-windows-x64-8.0.11-0-VS16.zip
Step 2. Extract php folder from the zip file
Step 3. Place the php folder in the Xampp folder
Go to the root of the Xampp folder and rename the current php folder to something like php7 and copy/paste the php folder you extracted. Make sure that the folder you extracted is called php.
Step 4. Open the XAMPP Control Panel and click the config button
Step 5. Click the Config Button next to apache
Choose the option Apache(httpd-xampp.conf), It will open the configuration file httpd-xampp.conf and change the lines highlighted from php 7 to 8. Be sure to change all the lines with php7_module to php_module throughout the file.
Step 6. Save and restart Apache
Now save the changes and start the Apache Web Server.
Now Xampp is updated with PHP 8