In my previous posts I explained examples using a solution file to compile and debug .NET (mono) in Visual Studio Code.
This post shows how to set up a task to run PHP using the build in Development Server of PHP.
In Visual Studio Code open the folder with the php file(s).
Then start the Command Palette and choose Configure Task Runner.
This creates a tasks.son file. Clear all and replace with the settings below:
Save the file and start the task from the Command Palette, choose Run Task and then 'php'.
A PHP Development Server has been started on port 8080. Start your browser, go to http://127.0.0.1:8080 and you will see the website from the selected folder.
At this moment it is not possible to debug PHP from Visual Studio Code.