I'm running windows 10 fresh copy and I just installed visual studio code. I was trying to develop a PHP project using VS Code. But I'm having trouble in setting up the environment.
I saw a blog post and I downloaded the binary file of PHP 7 and place it in the "C" drive. Then I set path variable too.
But still, I'm getting this issue.

Step 1 - Go to 'Environmental Variables'. Step 2 - Find PATH variable and add the path to your PHP folder. Step 3 - For 'XAMPP' users put 'C:\xampp\php' and 'WAMP' users put 'C:\wamp64\bin\php\php7. 1.9' ) and save.
On a Linux or Mac OS X system, this may be available as the file /usr/bin/php. If you've installed XAMPP, you can use the program /opt/lampp/bin/php on Linux, /Applications/xampp/xamppfiles/bin/php on Mac OS X, and C:\Program Files\xampp\php\php.exe on Windows.
You installed PHP IntelliSense extension, and this error because of it.
 So if you want to fix this problem go to this menu:File -> Preferences -> Settings
 Now you can see 2 window. In the right window add below codes:
{     "php.validate.executablePath": "C:\\wamp64\\bin\\php\\php7.0.4\\php.exe",     "php.executablePath": "C:\\wamp64\\bin\\php\\php7.0.4\\php.exe" } Just like below image.
NOTICE: This address C:\\wamp64\\bin\\php\\php7.0.4\\php.exe is my php7.exe file address. Replace this address with own php7.exe.
For those who are using xampp:
File -> Preferences -> Settings
"php.validate.executablePath": "C:\\xampp\\php\\php.exe", "php.executablePath": "C:\\xampp\\php\\php.exe" If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With