AKZN Notes

Archives for My Lazy and Forgetful Mind

How to Composer Install using different php version

1. Find Composer Installation Path

Run the following command to check system paths:

php -r "echo getenv('PATH');"

Look for a path similar to:

C:\ProgramData\ComposerSetup\bin\

Or search for "composer" in the output.


2. Run Composer Using a Specific PHP Version

Once you find the correct path, run:

C:\php83\php.exe C:\ProgramData\ComposerSetup\bin\composer.phar install

Replace C:\php83\php.exe with your desired PHP version path.

Leave a Reply

Your email address will not be published.