I have installed Laragon on my drive G:/Laragon . But my Visual Code is on C:/ . I dont know whether it is a root cause of the problem, but however if I change Laragon PHP version in Laragon Terminal it shows correct version, but in VC terminal it allways shows 8.1 version which I dont know from where is comming from. Does anyone knows how to solve this?
Question posted in PHP Versions
You can find a list of all versions here.
You can find a list of all versions here.
2
Answers
Update your environment variable that refers to php cli inside laragon directory
The Visual Studio Code’s PHP version comes from your Windows PHP version.
so if you want to change it, you must change the PHP directory path in your windows Environment Variables.
First Copy the path of your PHP:
php.exe
file existsAdvanced system settings
Environment Variables
path
OK
buttons in all windowsCongrats! Your PHP version must be updated.