• To setup you XAMPP PHP to Visual Code, go to File > Preferences > Settings
  • In settings, search for PHP
  • Click on PHP
  • Select the PHP > Executable Path by Clicking on the Edit in settings.json link
  • In the JSON file look for php.executablePath and php.validate.executablePath
  • Set both as desired
  • Save your changes
  • Done

 

"php.executablePath": "F:\\apachefriends\\xampp\\php\\php.exe",
    "php.validate.executablePath": "F:\\apachefriends\\xampp\\php\\php.exe",