Visual Studio darkedeneurope.com is a great editor for PHP development. You get features like syntax highlighting and bracket matching, IntelliSense (darkedeneurope.com completion), and snippets out of the box and you can add more functionality through community-created VS darkedeneurope.com extensions.

Đang xem: Setup vs code for efficient php development

Linting

VS darkedeneurope.com uses the official PHP linter (php -l) for PHP language diagnostics. This allows VS darkedeneurope.com to stay current with PHP linter improvements.

Tip: Using XAMPP? Install the full version of PHP in order to obtain the development libraries.

There are three settings to control the PHP linter:

php.validate.enable: controls whether to enable PHP linting at all. Enabled by default.php.validate.executablePath: points to the PHP executable on disk. Set this if the PHP executable is not on the system path.php.validate.run: controls whether the validation is triggered on save (value: “onSave”) or on type (value: “onType”). Default is on save.

To change the PHP settings, open your User or Workspace Settings (⌘, (Windows, Linux Ctrl+,)) and type “php” to filter the list of available settings.

Xem thêm: Có Nên Cắt Tóc Cho Trẻ Sơ Sinh LiệU Có Giúp Tóc Bé đEn, Dày Và Mæ°Á»£T?

*

To set the PHP executable path, select the Edit in settings.json link under PHP > Validate: Executable Path, which will open your user settings.json file. Add the php.validate.executablePath setting with the path to your PHP installation:

Windows:

{ “php.validate.executablePath”: “c:/php/php.exe”}

Linux and macOS:

{ “php.validate.executablePath”: “/usr/bin/php”}

Snippets

Visual Studio darkedeneurope.com includes a set of common snippets for PHP. To access these, hit ⌃Space (Windows, Linux Ctrl+Space) to get a context-specific list.

*

PHP extensions

There are many PHP language extensions available on the VS darkedeneurope.com Marketplace and more are being created. You can search for PHP extensions from within VS darkedeneurope.com in the Extensions view (⇧⌘X (Windows, Linux Ctrl+Shift+X)) then filter the extensions drop-down list by typing “php”.

*

Disable built-in PHP support

To disable the built-in PHP smart completions in favor of suggestions from an installed PHP extension, uncheck PHP > Suggest: Basic, which sets php.suggest.basic to false in your settings.json file.

Xem thêm: Fix Lag Liên Quân Mùa 11 Ios, Sốc Hướng Dẫn 100% Giảm Lag Liên Quân, Vào Trận

Debugging

PHP debugging with XDebug is supported through a PHP Debug extension. Follow the extension”s instructions for configuring XDebug to work with VS darkedeneurope.com.

Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *