If you are a Windows user, you can skip installing PHP and Composer in a single step using Laragon, in case you are Linux/MacOS you can follow this guide: https://dev.to/manuelojeda/setup-a-php-dev-enviroment-with-laravel-valet-and-wsl-1pp6
After you have installed all the things mentioned, I suggest you to install this extension in your VSCode:
This one will let you bring your VSCode configuration anywhere you need it, only vinculate your GitHut account and you are ready to go:
After having all of this installed let is begin with the dance.
First of all, let's tell VSCode where is the PHP Path is. Go to Settings and type php at the search bar, then look for the section; PHP › Validate: Executable Path then click in Edit in settings.json:
Once you have opened, look of the line that it says: "php.validate.executablePath". If you have it, make sure your php installation path is there, in case you haven't add this rule to your settings.json:
In Linux and Mac should be:
In Windows should be:
"php.validate.executablePath": "c:/Program Files/php/php.exe"
After doing this preparation you are ready to install and make your VSCode be ready to do some PHP code, let's roll!
What this extension does is giving some help depending on what version of PHP you have installed (at least PHP 7) giving you the autocompletition that Intellisense do in Visual Studio.
This is extension give you the posibility to auto add a Class from another file with few steps and without the necessity of tiping it at the beginning of your PHP file:
This extension linter you code and tells you what you need to have an overall standar for a PHP code made. Follow up the installation guide and enjoy having a PHP linter in VSCode.
This extension gives you some helpful snippets when you are coding some blade files for the views of Laravel.
This provides an interface to manage your Composer dependencies and validates your composer.json config file
With these extensions your PHP development will be boosted greatly and make Visual Studio Code a great free alternative in the market. I hope this post was helpul to you and I wish to you good luck in the path.