How to use PHP in VSCode? [closed]

closed . This question needs to be more objective and is not currently accepting answers.

want to improve this question? update the question to focus on just one problem when edit it .

Closed 1 year ago .

improve this question

Good afternoon! I used the PHP storm IDE to program in PHP, and it allows connection to a remote server and execution of code there on the server. Now, I migrated to VS Code and would like to know how I can program in PHP in this IDE. Where do I enter the data from the remote server? How do I run a script? Thank you!

Ps: I've already installed some extensions like PHP IntelliSense and PHP Debug, but I still don't know what to do.

Ps2: I use LocaWeb server, this programming in PHP would be for a web page.

Author: Lucas Vicente, 2019-03-30

1 answers

VSCode is not an IDE like PHPStorm, so you don't have natively how to put the server data and other facilities that PHPStorm natively gave you.

What I do is have my VSCode with the most recommended PHP extensions installed, for this you just open the editor and go to the sidebar in the extensions part, in the search Type: @recommended php.

Then you can use the integrated VSCode terminal (via the hotkey or via the VSCode tab). ctrl + shift + p commands by typing "Open new terminal". From there you can develop normally, it is possible to use the native PHP server with php -S in the terminal itself, after all PHP is only a text file that is interpreted in the browser.

There are other extensions like the ones below to be able to facilitate a you use git VSCode already has the native git extension, otherwise you can fetch other extensions with FTP to be able to access the server.

 3
Author: KhaosDoctor, 2019-03-30 22:09:23