Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Kris01's avatar

PhP Xampp

I am installing two different versions of xampp, because I need to different php versions for two different laravel projects. But it looks that the php version remains the same. How can I run two different php versions?

0 likes
2 replies
jorqensen's avatar

It's going to require a bit of manual tinkering with your system. Perhaps try out Laragon instead that has a feature to combat this exact "problem".

priyalaks's avatar
  1. Install new Xampp in a different location from your old XAMPP

  2. Change the PATH in your local environment variables (new PHP path should be above old PHP path)

  3. Run refreshenv in your terminal

refreshenv

You will get the below message

Refreshing environment variables from registry for cmd.exe. Please wait...Finished..
  1. Reopen VSCode / or your IDE

  2. When you want to switch between the other ,you have to swap your system's local environment Variable - follow the above steps again .

Please or to participate in this conversation.