Here I am developing a simple Laravel project that uses php version 7.1.3, and php version 8.1.2 is installed on my computer.
How to specify specific php versions for different projects?
I tried reinstalling php version 7.1 but I have other projects on my computer using version 8 or higher.
Can I specify a specific php version for different Laravel projects?
Use Laragon
I don't know if other stacks are possible, but Laragon is a lightweight and performant option.
As described here It's easy and has very few steps.
LAMPP
orLEMMP
stack for WindowsLaragon will choose the folder name as the identifier.
NOTE: You can configure apache
or
nginxto provide each directory with its own version, but it is not covered in this article. You should learn it from the official documentation.