php.md

 1# PHP
 2
 3PHP support is available through the [PHP extension](https://github.com/zed-industries/zed/tree/main/extensions/php).
 4
 5- Tree Sitter: https://github.com/tree-sitter/tree-sitter-php
 6- Language Servers:
 7  - [phpactor](https://github.com/phpactor/phpactor)
 8  - [intelephense](https://github.com/bmewburn/vscode-intelephense/)
 9
10## Choosing a language server
11
12The PHP extension offers both `phpactor` and `intelephense` language server support.
13
14`phpactor` is enabled by default.
15
16## Intelephense
17
18[Intelephense](https://intelephense.com/) is a [proprietary](https://github.com/bmewburn/vscode-intelephense/blob/master/LICENSE.txt#L29) language server for PHP operating under a freemium model. Certain features require purchase of a [premium license](https://intelephense.com/). To use these features you must place your [license.txt file](https://intelephense.com/faq.html) at `~/intelephense/licence.txt` inside your home directory.
19
20To switch to `intelephense`, add the following to your `settings.json`:
21
22```json
23{
24  "languages": {
25    "PHP": {
26      "language_servers": ["intelephense", "!phpactor", "..."]
27    }
28  }
29}
30```
31
32## PHPDoc
33
34Zed supports syntax highlighting for PHPDoc comments.
35
36- Tree Sitter: [claytonrcarter/tree-sitter-phpdoc](https://github.com/claytonrcarter/tree-sitter-phpdoc)