If you want to run your php file in the terminal, open the command palette and select 'Tasks: Run Task' followed by 'Run In Terminal'.
This creates user-level tasks which can be used any time and in any workspace.
Now copy my configuration below into your tasks.json file. Using Build Tasksįirst open the command palette ( Ctrl+ Shift+ P in Windows, ⌘+ Shift+ P in Mac), and select 'Tasks:Open User Tasks'. If you don't want to install xDebug or other extensions and just want to run a PHP file without debugging, you can accomplish this using build tasks.