I'm currently using XAMPP for my local web development, but I'm hitting a wall. Some of my clients are using really outdated versions of PHP, and XAMPP only allows for one PHP version at a time. I need something that lets me easily switch between different PHP versions for different projects. Any recommendations?
6 Answers
I generally just use the development server for whichever tech stack I'm working with. It keeps things straightforward!
Docker is the way to go! It lets you replicate any stack without messing up your host system, which is super helpful for your situation.
I'm trying Docker right now, still figuring it out, but it seems promising.
I prefer Docker too because once you get it set up locally, you can deploy the container to production without any changes. It's really efficient!
Using WSL2 is an excellent choice if you want to mirror your production environment exactly. It's quite handy!
If you're on Windows, I've had good experiences with Laragon. It’s simple and works well for local dev.
You might want to check out ddev (ddev.com). It's great for managing different container setups with a simple YAML file. You can pick any PHP version from 5.x up to 8.5, plus options for MySQL, MariaDB, or PostgreSQL. It even lets you customize your stack further if needed. Seems like exactly what you’re after!
That sounds interesting. I'm currently running Docker with XAMPP PHP 5.6 for a legacy site, but ddev seems more flexible for managing different site requirements.

But what do you do when different clients are using various tech stacks?