When working on modern PHP projects like those built with Laravel, you will eventually run into version conflicts.
One project may require PHP 8.3, while another older project may still run on PHP 8.1 or 8.2. If your system only has one PHP version installed, you will constantly run into errors like:
Composer detected issues in your platform:
Your Composer dependencies require a PHP version ">= 8.3.0".
You are running 8.2.12.
Instead of reinstalling PHP every time you switch projects, the better solution is to install multiple PHP versions and switch between them instantly.
One of the easiest ways to achieve this on Windows is by using Scoop, a lightweight package manager designed for developers.
Below is a simple and clean setup.
1. Install Scoop
Open PowerShell and run:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
irm get.scoop.sh | iex
Confirm installation:
scoop --version
Scoop installs tools into your user directory and avoids the common permission problems that occur with traditional installers.
2. Add the Versions Bucket
Scoop organizes packages using "buckets". To install multiple PHP versions, you need the versions bucket.
scoop bucket add versions
This bucket contains packages like:
- php81
- php82
- php83
3. Install Multiple PHP Versions
You can now install any PHP version you need.
Example:
scoop install php82
scoop install php83
Check installed packages:
scoop list
At this point both PHP versions exist on your system, but only one will be active at a time.
4. Switch Between PHP Versions
To switch to PHP 8.3:
scoop reset php83
To switch to PHP 8.2:
scoop reset php82
Verify the active version:
php -v
This instantly updates your terminal environment.
5. Running Your Laravel Project
Once the correct version is active, you can start your project normally:
php artisan serve
If the project requires PHP 8.3, switching to php83 will resolve the platform check error.
Why This Approach Is Powerful
Modern development environments rarely use a single runtime version.
You may have projects such as:
- Legacy project running PHP 8.1
- Production system using PHP 8.2
- New Laravel 11 applications requiring PHP 8.3
Using Scoop allows you to move between these environments instantly without reinstalling anything.
Bonus: Install Other Developer Tools
Scoop can also install common development tools:
scoop install composer
scoop install nodejs
scoop install git
This creates a clean development environment that is easy to maintain and update.
Final Thoughts
Managing multiple PHP versions used to be complicated on Windows. With Scoop, the process becomes simple and developer friendly.
Instead of fighting your environment, you can focus on building applications and switching versions only when necessary.
For backend developers working with frameworks like Laravel, this setup saves time and prevents version related errors during development.
Top comments (0)