- Open the project settings and click PHP.
-
Click the Browse button
next to the Interpreter drop-down list
in the Development environment section.
-
In the Interpreters dialog box, that opens, click the Add toolbar button
on the left-hand pane.
-
On the right-hand pane of the dialog box, specify the PHP installation settings.
- In the Name text box, type the identifier to distinguish the installation from others, for example, php_installation_<version>.
-
Specify the PHP engine installation directory in the PHP Home field.
Type the path manually or click the Browse button
and choose the location in the
Choose PHP Home dialog box, that opens.
-
In the Debugger drop-down list, specify the debugging engine to use in the project.
Tip
The chosen debugging engine must be enabled in the php.ini file in the specified PHP installation directory.
-
Optionally, customize the configuration settings of the installation. In the Configuration options field, compose a string of configuration directives
to be passed through the -d command line option
and thus add new entries to the php.ini file.
To do that, click the Browse button
next to the Configuration options field,
and then create a list of entries in the Configuration Directives dialog box, that opens.
-
To add a new entry, click the Add button
.
In the new line, that is added to the list, specify the name of the new entry and its value in the Name and Value text boxes respectively.
Note
You can add as many entries as you need, just keep in mind that they will be transformed into a command line with its length limited to 256 characters.
-
To delete an entry, select it in the list and click the Remove button
.
-
To change the order of entries, use the Up
and Down
buttons.
Upon clicking OK, you return to the Interpreters dialog box, where the entries are transformed into a command line.
-
To add a new entry, click the Add button
- Open the project settings and click PHP.
- In the PHP page that opens, choose the installation to use from the Interpreter drop-down list.
-
To make sure that the configuration you have chosen points at the relevant installation,
click the Reload button
next to the drop-down list. If no PHP engine is actually installed at the specified directory, PhpStorm displays the corresponding error message.
-
To examine the installation details, click the Show phpinfo button
next to the drop-down list
and view the full list of installation settings in a separate window. Actually, PhpStorm checks the installation and displays
the result of executing the phpinfo command.
-
To make sure that the configuration you have chosen points at the relevant installation,
click the Reload button
-
In the PHP language level drop-down list, specify the PHP functionality scope to get coding assistance for. Each functionality scope is associated with PHP version
that supports this functionality.
No correlation between the PHP version used in the project and the language level is enforced. Although the language version of each interpreter is detected automatically, you can still tell PhpStorm to provide you with coding assistance that corresponds to another language level. However, if you attempt to use a code construct that is not supported by the specified language level, PhpStorm suggests a Switch to PHP <version> quick-fix.
