[php] Is there way to use two PHP versions in XAMPP?

You can have two different versions of XAMPP.

  • Download those files from https://www.apachefriends.org/download.html and install into a directory of your choice, for example in C:\5.6.31\xampp and C:\7.1.18\xampp.
  • After every installation go to installed directory (ex. C:\5.6.31\xampp, C:\7.1.18\xampp) and start the "setup_xampp.bat" and you should see something like this.
  • You can make shortcuts of "xampp-control.exe" on your desktop (right click on "xampp-control.exe" Send to -> Desktop) and rename shortcuts for ex. "xampp 5.6.31" and "xampp 7.1.8".
  • Start XAMPP control panel with double-click on "xampp-control.exe" or previously created shortcut and start Apache and MySQL servers.
  • To test installiation open your browser and type 127.0.0.1 or localhost in the location bar. You should see XAMPP start screen.
  • Do not open more then one XAMPP control panel.
  • XAMPP uninstall? Simply remove the "xampp" Directory. But before please shutdown the apache and mysql.
  • That's all. You can use different php versions opening corresponding XAMPP control panel.