Short answer is no.
XAMPP is normally built around a specific PHP version to ensure plugins and modules are all compatible and working correctly.
If your project specifically needs PHP 5.3 - the cleanest method is simply reinstalling an older version of XAMPP with PHP 5.3 packaged into it.
XAMPP 1.7.7 was their last update before moving off PHP 5.3.
Answer from James on Stack OverflowShort answer is no.
XAMPP is normally built around a specific PHP version to ensure plugins and modules are all compatible and working correctly.
If your project specifically needs PHP 5.3 - the cleanest method is simply reinstalling an older version of XAMPP with PHP 5.3 packaged into it.
XAMPP 1.7.7 was their last update before moving off PHP 5.3.
Long answer: it is possible!
- Temporarily rename existing xampp folder
- Install xampp 1.7.7 into xampp folder name
- Folder containing just installed 1.7.7 distribution rename to different name and previously existing xampp folder rename back just to xampp.
- In xampp folder rename php and apache folders to different names (I propose php_prev and apache_prev) so you can after switch back to them by renaming them back.
- Copy apache and php folders from folder with xampp 1.7.7 into xampp directory
In xampp directory comment line apache/conf/httpd.conf:458
#Include "conf/extra/httpd-perl.conf"In xampp directory do next replaces in files:
php/pci.bat:15
from
"C:\xampp\php\.\php.exe" -f "\xampp\php\pci" -- %*
to
set XAMPPPHPDIR=C:\xampp\php
"%XAMPPPHPDIR%\php.exe" -f "%XAMPPPHPDIR%\pci" -- %*
php/pciconf.bat:15
from
"C:\xampp\php\.\php.exe" -f "\xampp\php\pciconf" -- %*
to
set XAMPPPHPDIR=C:\xampp\php
"%XAMPPPHPDIR%\.\php.exe" -f "%XAMPPPHPDIR%\pciconf" -- %*
php/pear.bat:33
from
IF "%PHP_PEAR_PHP_BIN%"=="" SET "PHP_PEAR_PHP_BIN=C:\xampp\php\.\php.exe"
to
IF "%PHP_PEAR_PHP_BIN%"=="" SET "PHP_PEAR_PHP_BIN=C:\xampp\php\php.exe"
php/peardev.bat:33
from
IF "%PHP_PEAR_PHP_BIN%"=="" SET "PHP_PEAR_PHP_BIN=C:\xampp\php\.\php.exe"
to
IF "%PHP_PEAR_PHP_BIN%"=="" SET "PHP_PEAR_PHP_BIN=C:\xampp\php\php.exe"
php/pecl.bat:32
from
IF "%PHP_PEAR_BIN_DIR%"=="" SET "PHP_PEAR_BIN_DIR=C:\xampp\php"
IF "%PHP_PEAR_PHP_BIN%"=="" SET "PHP_PEAR_PHP_BIN=C:\xampp\php\.\php.exe"
to
IF "%PHP_PEAR_BIN_DIR%"=="" SET "PHP_PEAR_BIN_DIR=C:\xampp\php\"
IF "%PHP_PEAR_PHP_BIN%"=="" SET "PHP_PEAR_PHP_BIN=C:\xampp\php\php.exe"
php/phar.phar.bat:1
from
%~dp0php.exe %~dp0pharcommand.phar %*
to
"%~dp0php.exe" "%~dp0pharcommand.phar" %*
Enjoy new XAMPP with PHP 5.3
Checked by myself in XAMPP 5.6.31, 7.0.15 & 7.1.1 with XAMPP Control Panel v3.2.2
Videos
I think the most safest downgrade path from PHP7 to PHP5 in Xampp is:
Download a self-packaged version of Xampp with PHP5 from here (as of today this is
xampp-win32-5.6.37-0-VC11.zip).Rename the
phpfolder tophp7in Xampp.Now copy the
phpfolder fromxampp-win32-5.6.37-0-VC11.zipinto your Xampp install folder.Make a backup from
.\xampp\apache\conf\extra\httpd-xampp.conffile.Replace this file from
xampp-win32-5.6.37-0-VC11.zipas well.This way the config files (including
php.ini) has settings from the Xampp team.
Before any changes, to verify changed Apache configs, you can compare both Xampp release folder at
.\xampp\apache\confwith tools like Meld.I should note that please download PHP 5 and 7 Xampp packages released at the same time.
Notify me if I miss something.
If you want to downgrade php from 7.1.1 to 5.6 in xampp follow the steps(For Windows):-
- Go to https://sourceforge.net/projects/xampp/files/XAMPP%20Windows/5.6.36/
- Download and extract the file xampp-win32-5.6.36-0-VC11.zip see the image [image 1][1]
Delete php folder and apache folder present in C:\xampp
Copy php folder and apache folder from extracted file and paste it to C:\xampp
Add " C: " before \xampp\ to php ini file present in php folder.
Start your apache and MySQL and check php version. It will show php 5.6.36
Please note
This answer is not valid for new version of XAMPP.
First, you'll need to stop Apache from XAMPP. Then,
Go go cmd and switch to your XAMPP folder. For example, if your XAMPP folder is in C:\
C:\>cd C:\XAMPP
In this folder is a file named php-switch.bat, run from the command line. If not, you can also run php-switch.bat directly.
You'll see the version you are now on, and procedure to switch. For example, type 4 to switch PHP 4 then follow the procedure.

PHP 4 will install in your XAMPP\PHP directory and successfully switch. then re-enable the Apache.
The best method is to change the PHP settings in
/apache/conf/extra/httpd-xampp.conf
to reflect the new version of PHP you want to use
In my case I unpacked PHP5.4 to C:\XAMPPLITE\PHP5.4 and then updated key lines in this file such as:
SetEnv PHPRC "C:\\xampplite\\php5.4"
LoadFile "C:/xampplite/php5.4/php5ts.dll"
PHPINIDir "C:/xampplite/php5.4"
You also need to ensure that the correct version of php5apache2_2.dll is installed
To ensure this I copied the new version of php5apache2_2.dll to the Apache modules directory with a unique name, and then modified the configuration to match that:
copy php5.4\php5apache2_2.dll apache\modules\php5apache2_2-5_4.dll
and in the httpd-xampp.conf file
LoadModule php5_module modules/php5apache2_2-5_4.dll