PHP IntelliSense in the Browser
Extensions view, and search for
"PHP Tools". Click
Install to confirm.
During the first run, the extension may take some time to load since it needs to be downloaded first. Watch the VSCode status bar at the bottom, where is a loading progress icon.
All the editor features can be used in the browser-based development environment. See the limitations below for the details.
PHP Language Level
The PHP code editor and code analysis can be configured as described on configuration page. Additionally, choosing the PHP version in the browser-based editor popups the following PHP language level selector:
The PHP language level configures the code problems analysis, code completion, and hints.
PHPDoc is generated seamlessly. Type
/** above a declaration to create the PHPDoc comment block.
Note, it is necessary to enable the Format-On-Type feature in
Settings - where
editor.formatOnType must be set to
The limitations are described on the VS Code's documentation page: https://code.visualstudio.com/docs/editor/vscode-web#_limitations.
Since the editor won't process all the files in your workspace, the IntelliSense might not be complete. In the result, code lenses with useful commands are not enabled since they would not provide complete results, code problems do not mention unknown classes and functions, tooltips might not provide the complete information, and Laravel facades might not provide complete IntelliSense either.