Skip to content

PHP Support in Brackets

Shubham Yadav edited this page May 10, 2019 · 7 revisions

We've introduced the PHP support in Brackets 1.14, powered by the PHP language server.

Note: The PHP features will only work if Brackets is able to find a valid PHP7 runtime in the system path, or if a valid PHP7 executable path configuration is set in brackets.json. Click here to understand about other PHP settings.

Brackets now supports the following features for PHP:

  • Code Hinting - Open a PHP file and just get going... Code Hinting
  • Parameter Hinting - Contextual parameter hints tell the user where they are in the call context Parameter Hinting
  • Jump to Definition - Ctrl-J and you're all set... Jump to Definition
  • Linting - Diagnostics 'on type' or 'on save'... Linting
  • Find References - Place the cursor and just right click or Shift-F12... Linting
  • Find Document Symbols - Ctrl-T to list all the symbols in the current document... Linting
  • Find Project Symbols - Ctrl-Shift-T to list all the project wide symbols... Linting

PHP in Brackets can also be configured using custom settings in brackets.json:

  • Go to Debug > Open Preferences File
// PHP Tooling default configuration settings
"php": {
        "enablePhpTooling": true, //false to disable PHP features
	"executablePath": "php"//Path format: "C:\\path\\to\\php.exe" for WIN  or "/Users/someuser/bin/php" for MAC & Linux
	"memoryLimit": "4095M", //Specify a memory limit for the PHP language server process
	"validateOnType": "false" //Configuration to have diagnostics "on type" or "on save"
}

Note: Don't forget to remove comments while using as valid JSONs can't have comments.

Clone this wiki locally