The page and all the pages under this node are available only when the PHP plugin is enabled. The PHP plugin is bundled with PhpStorm and activated by default. If the plugin is disabled, enable it on the Installed tab of the Settings/Preferences | Plugins page, as described in Managing plugins.
Use this page to configure PHP development and unit testing support in the project by choosing one of the available PHP interpreters, see Configure local PHP interpreters and Configure remote PHP interpreters.
Description
PHP language level
In this list, specify the PHP functionality scope to get coding assistance for. Each functionality scope is associated with the PHP version that supports this functionality. Currently PHP 5.3 , PHP 5.4 , PHP 5.5 , PHP 5.6 , PHP 7 , PHP 7.1 , PHP 7.2 , PHP 7.3 , PHP 7.4 , and PHP 8.0 levels are supported. See supported PHP versions for details.
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 a different 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 quick-fix.
When you open an existing project, PhpStorm analyzes it for the language features used and sets the appropriate language level automatically.
You can also set the PHP language level directly from the status bar.
The list is inactive when the PHP language version is constrained in composer.json and settings synchronization with composer.json is enabled on the Composer page of the Settings/Preferences dialog Ctrl+Alt+S .
In this list, choose the PHP interpreter to use in the current project by default. The list contains all the currently configured local and remote PHP interpreters. See Configure local PHP interpreters and Configure remote PHP interpreters for details.
Shift+Enter
Click this button next to the CLI Interpreter list to create a new PhpStorm-wide PHP installation configuration in the CLI Interpreters dialog that opens.
When you configure a remote interpreter accessible through SFTP, Vagrant, Docker, or WSL this read-only field shows the path mappings retrieved from the corresponding deployment configuration, Vagrantfile , or Dockerfile . These mappings are read-only.
To provide the custom mappings, click next to the field and specify them in the Edit Project Path Mappings dialog that opens:
To add a custom mapping, click and specify the path in the project and the corresponding path on the remote runtime environment in the Local Path and Remote Path fields respectively. Type the paths manually or click and select the relevant files or folders in the dialog that opens.
To remove a custom mapping, select it in the list and click .
Include Path Tab
The area displays the list of configured include paths . Include paths are used for holding third-party code that is used for completion and reference resolution in some functions/methods that use file paths as arguments, for example, require() or include() .
Use and to add and remove paths.
Use and to reorder the items in the list.
Click to sort the paths alphabetically in the ascending order.
PHP Runtime Tab
The area lists the available PHP stubs, which are normal, syntactically correct PHP files containing annotated function, method, and class signatures, constant definitions, and so on. PHP stubs are added to PhpStorm’s internal knowledge to enhance coding assistance for all the Standard PHP Library components as well as for common extensions.
Use the checkboxes next to each item to enable/disable the corresponding stub.
To load the set of stubs that matches the set of loaded extensions for the currently configured CLI interpreter, click the Sync Extensions with Interpreter button. For details on configuring interpreters, see Configure local PHP interpreters and Configure remote PHP interpreters.
In the Project tool window, the currently loaded stubs are displayed under the External Libraries node.
PHP stubs are open-source, and you can contribute to their development. See the blog post for details.
Advanced Settings Area
If necessary, you can load a set of custom PHP stubs to be used by PhpStorm. Click next to the Default stubs path field and provide the stubs folder location in the dialog that opens. This way, you can loaPhpStormonal stubs as well as override the bundled ones.
PHP stubs are available as a Composer package, and can thus be declared and installed as a dependency for some third-party package. In this case, they are stored under the vendor/jetbrains/phpstorm-stubs folder inside your project.
To prevent conflicts between the Composer package stubs and PhpStorm bundled stubs, do one of the following:
To use the Composer package stubs in your project, explicitly provide the path to their location in the Default stubs path field.
To use the PhpStorm’s bundled PHP stubs, make sure that the Default stubs path field is cleared and the vendor/jetbrains/phpstorm-stubs folder is excluded from the project.
If the Add packages as libraries option is enabled on the PHP | Composer page of the Settings/Preferences dialog Ctrl+Alt+S , PhpStorm automatically marks the vendor/jetbrains/phpstorm-stubs folder as excluded. By default, the option is enabled.
If the Add packages as libraries is disabled, you can exclude the stubs package folder manually. To do this, in the Project view, right-click the vendor/jetbrains/phpstorm-stubs folder and select Mark Directory as | Excluded from the context menu.
For details in working with Composer in PhpStorm, refer to Composer dependency manager.
Analysis Tab
Use this tab to configure the behavior of certain PhpStorm inspections.
Exception Analysis
Use this section to configure exception analysis, which alters the behavior of the Unhandled exception , Redundant catch clause , Missing @throws tag(s) , and Redundant @throws tag(s) inspections.
Description
Call tree analysis depth
Use this list to set the desired exception analysis depth level. By default, 1 is selected, in which case PhpStorm reports the unhandled exceptions for the parent method throwing an exception, as well as the methods directly calling it. Selecting larger values allows you to drill down deeper into the calls hierarchy.
If 0 is selected, the exception analysis is limited to the parent method.
Values greater than 1 might negatively affect the IDE’s performance.
Skip calls with constant params
Select this checkbox to have PhpStorm skip certain method calls in the instance creation expressions during exception analysis:
Method calls only having strings or constants as parameters are skipped:
Method calls having variables, integers, arrays, and so on as parameters are not skipped:
Unchecked Exceptions
Use this list to specify the exceptions that are treated as unchecked by PhpStorm. Such exceptions are skipped during exception analysis.
Alt+Insert
Click this button to add a class to the Unchecked Exceptions list. In the Choose Class dialog that opens, locate the desired class by using the Search by Name tab or the Project tab.
Delete
Click this button to remove a selected class from the Unchecked Exceptions list.
Use this section to include your custom string formatting functions into the Format function parameters mismatch inspection analysis scope. This inspection reports the mismatches between format function parameters and specification conversion entries and by default analyzes the usages of the standard PHP printf and sprintf functions.
Description
Alt+Insert
Click this button to add a new function record to the custom format functions list. In the Add Custom Format Function dialog that opens, provide the name of a class method or function and specify the index of the argument where your formatting template resides.
Delete
Click this button to remove a function record from the custom format functions list.
Enter
Click this button to edit the selected function record.
Include Analysis
Use this section to define a custom folder the $_SERVER[‘DOCUMENT_ROOT’] expression should resolve to, which alters the behavior of the Unresolved include inspection.
The specified path will be used in code completion for the functions/methods that use file paths as arguments (for example, require() or include() ). If the path is left blank, code completion will suggest the paths relative to the project root.
Commonly, this setting should be modified in case the document root folder defined by your web server configuration is different from the PhpStorm project root folder.
Item
Description
$_SERVER[‘DOCUMENT_ROOT’
In this field, provide the folder the $_SERVER[‘DOCUMENT_ROOT’] expression should resolve to.
The default value is blank: the $_SERVER[‘DOCUMENT_ROOT’] expression in this case resolves to the project root folder. To have it resolve to a different folder, type the desired folder path relative to the project root, or click and select the desired folder in the dialog that opens.
Источник
Cli interpreter phpstorm linux
На данный момент, PhpStorm – одна из лучших IDE для разработки на языке PHP, которая предоставляет множество возможностей для разработчика, такие как запуск PHP-скриптов, благодаря возможности подключения внешнего интерпретатора PHP и отладку через расширение Xdebug.
В этой статье мы рассмотрим возможность подключения интерпретатора PHP, отладчика Xdebug к PhpStorm и использование встроенного в IDE web-сервера.
Начнем с установки отладчика Xdebug в PHP.
Установка Xdebug
Первым делом скачаем и установим сам интерпретатор PHP по ссылке: http://php.net/downloads.php
Далее нужно произвести начальную настройку PHP и прописать в переменную окружения PATH путь к интерпретатору. Чтобы не повторяться, весь необходимый порядок действий мной описан в этой статье: Установка Composer и снятие ограничения количества обращений к GitHub
Теперь можно перейти к установке отладчика Xdebug, для которого существует специальный помощник, значительно упрощающий процедуру установки. Для его использования перейдем по ссылке: https://xdebug.org/wizard.php
На этой странице, необходимо ввести в поле ввода информацию об установленном PHP-интерпретаторе, которая генерируется с помощью PHP-функции phpinfo(). Вводить нужно весь скопированный текст со страницы.
Или, введя в консоль команду php -i, которая генерирует информацию о PHP.
Копируем полученную информацию, нажимаем кнопку Analyse my phpinfo() output и получаем инструкцию по установке Xdebug.
В зависимости от вашей версии PHP и пути установки инструкция может отличаться от моей:
Скачиваем библиотеку Xdebug для PHP версии 5.6.19 по ссылке: php_xdebug-2.4.0-5.6-vc11-nts.dll
Перемещаем её в папку C:\php\ext
В файл C:\php\php.ini находим секцию Dynamic Extensions и добавляем следующую строку:
Подключение интерпретатора PHP к PhpStorm
Теперь перейдем в PhpStorm и откроем настройки комбинацией клавиш Ctrl+Alt+S.
Далее, в секции Languages & Frameworks выберем пункт PHP. В этой секции необходимо назначить интерпретатор для IDE в пункте Interpreter нажав на кнопку …
В открывшемся окне, в поле Name вводим любое имя для удобства дальнейшей идентификации, например: PHP 5.6.11.
В поле PHP executable указываем путь до интерпретатора, например: C:\php\php.exe. Обратите внимание на появившуюся версию PHP и дебагера, что свидетельствует о правильности установки.
Чтобы убедиться в том, что правильно отрабатывает подключенный интерпретатор PHP, создадим в PhpStorm новый проект, добавим к нему файл index.php и запишем в этот файл, например, функцию var_dump([ 1, 2, 3 ]) с переданным в неё массивом.
Нажав правой кнопкой мыши на этом файле, выберем Open in Browser -> Default.
На странице мы видим характерный вывод var_dump(), который генерируется с помощью Xdebug. И, если посмотреть на заголовки ответа через консоль разработчика, то мы увидим, что всё работает верно:
Начальная настройка Xdebug и установка его под линукс описана в статье Установка модуля Xdebug для PHP под Ubuntu Linux
Работа с отладчиком Xdebug в PhpStorm
Прежде чем приступит к отладке PHP-скриптов с помощью Xdebug произведем необходимую настройку в файле php.ini. В секции Dynamic Extensions после подключения расширения Xdebug добавим следующие настройки:
Теперь зайдем в PhpStorm и откроем настройки. Перейдем в Languages & Frameworks -> PHP -> Debug. В секции Xdebug убедимся, что установлены следующие настройки:
Чтобы проверить, что все действия были проведены верно, добавим в уже имеющийся в проекте файл index.php следующий код:
И поставим точку остановки на переменной $arr.
Теперь запустим отладку этого скрипта, нажав правую кнопку мыши и выбрав пункт Debug ‘index.php’. Если все было сделано правильно, то в PhpStorm появится вывод дебага, как показано на скриншоте.
В итоге, мы получили мощный и удобный инструмент для отладки PHP-скриптов с подключенным интерпретатором PHP, а также возможность запускать скрипты через встроенный в PhpStorm локальный web-сервер.
Источник
Configure remote PHP interpreters
The term remote PHP interpreter denotes a PHP engine installed on a remote host or in a virtual environment. The term remote PHP interpreter is used as the opposite of local PHP interpreters that are installed on your computer, see Configuring Local PHP Interpreters.
You can access a remote PHP interpreter through SSH, Docker, Docker Compose, Vagrant, or WSL:
By using SSH , you can access a PHP interpreter through the SSH access to the host where the PHP interpreter is installed.
Before you start:
Configure access to an ssh server on the target remote host and make sure this server is running.
Make sure the PHP Remote Interpreter and FTP/SFTP Connectivity plugins are enabled. The plugins are activated by default. If the plugins are disabled, enable them on the Installed tab of the Plugins page as described in Manage plugins.
Create an SSH configuration as described in Create SSH configurations.
Configure a PHP interpreter using SSH
Press Ctrl+Alt+S to open the IDE settings and select PHP .
On the PHP page that opens, click next to the CLI Interpreter list.
In the CLI Interpreters dialog that opens, click in the left-hand pane, then choose From Docker, Vagrant, VM, WSL, Remote. from the popup menu.
In the Configure Remote PHP Interpreter dialog that opens, choose the SSH method.
From the SSH configuration list, choose one of the created SSH configurations, or click and create a new configuration as described in Create SSH configurations.
To use an interpreter configuration, you need path mappings that set correspondence between the project folders, the folders on the server to copy project files to, and the URL addresses to access the copied data on the server. PhpStorm first attempts to retrieve path mappings itself by processing all the available application-level configurations. If PhpStorm finds the configurations with the same host as the one specified in the selected SSH configuration, the mappings from these configurations are merged automatically. If no configurations with this host are found, PhpStorm displays an error message informing you that path mappings are not configured.
To fix the problem, open the PHP page of the IDE settings Ctrl+Alt+S , click in the Path mappings field and map local folders to the folders on the server.
For remote hosts, PhpStorm by default suggests the /usr/bin/php location.
To specify a different folder, click and choose the relevant folder in the dialog that opens. Note that the PHP home directory must be open for editing.
When you click OK , PhpStorm checks whether the PHP executable is actually stored in the specified folder.
If no PHP executable is found, PhpStorm displays an error message asking you whether to continue searching or save the interpreter configuration anyway.
If the PHP executable is found, you return to the CLI Interpreters dialog where the installation folder and the detected version of the PHP interpreter are displayed.
In the CLI Interpreters dialog, click Show phpinfo to have PhpStorm display a separate information window with the installation details and the list of loaded extensions and configured options. Note that the additional options specified in the Configuration Options field of the PHP Interpreters dialog are not listed.
By using the Docker configuration, you can access a PHP interpreter installed in a Docker container.
Before you start:
Make sure that Docker is downloaded, installed, and configured on your computer as described in Docker.
Make sure the Docker and PHP Docker plugins are installed and enabled. The plugins are activated by default. If the plugins are disabled, enable them on the Installed tab of the Plugins page as described in Manage plugins.
Configure the PHP development environment in the Docker container to be used.
Learn more about using Docker with PhpStorm in Docker.
Configure a PHP interpreter in a Docker container
Press Ctrl+Alt+S to open the IDE settings and select PHP .
On the PHP page that opens, click next to the CLI Interpreter list.
In the CLI Interpreters dialog that opens, click in the left-hand pane, then choose From Docker, Vagrant, VM, WSL, Remote. from the popup menu.
In the Configure Remote PHP Interpreter dialog that opens, choose the Docker method.
Provide the connection parameters:
In the Server field, specify the Docker configuration to use, see Configure the Docker daemon connection settings for details. Select a configuration from the list or click New. and create a new configuration on the Docker page that opens.
In the Image name field, specify the base Docker image to use. Choose one of the previously downloaded or your custom images from the list or type the image name manually, for example, php:latest or php:7.0-cli . When you later launch the run configuration, Docker will search for the specified image on your machine. If the search fails, the image will be downloaded from the Docker Official Images repository on the Docker Registry page.
For Docker containers, PhpStorm by default suggests the php location.
When you click OK , PhpStorm checks whether the PHP executable is actually stored in the specified folder.
If no PHP executable is found, PhpStorm displays an error message asking you whether to continue searching or save the interpreter configuration anyway.
If the PHP executable is found, you return to the CLI Interpreters dialog where the installation folder and the detected version of the PHP interpreter are displayed.
In the CLI Interpreters dialog, click Show phpinfo to have PhpStorm display a separate information window with the installation details and the list of loaded extensions and configured options. Note that the additional options specified in the Configuration Options field of the PHP Interpreters dialog are not listed.
By using the Docker Compose configuration, you can access a PHP interpreter running in a multi-container Docker Compose environment.
This functionality requires docker-compose version 1.18.0 or later.
Before you start:
Make sure that Docker is downloaded, installed, and configured on your computer as described in Docker.
Make sure the Docker and PHP Docker plugins are installed and enabled. The plugins are activated by default. If the plugins are disabled, enable them on the Installed tab of the Plugins page as described in Manage plugins.
Configure the PHP development environment in the Docker container to be used.
Learn more about using Docker Compose with PhpStorm in Using Docker Compose.
Configure a PHP interpreter using Docker Compose
Press Ctrl+Alt+S to open the IDE settings and select PHP .
On the PHP page that opens, click next to the CLI Interpreter list.
In the CLI Interpreters dialog that opens, click in the left-hand pane, then choose From Docker, Vagrant, VM, WSL, Remote. from the popup menu.
In the Configure Remote PHP Interpreter dialog that opens, choose the Docker Compose method.
Provide the connection parameters:
In the Server field, specify the Docker configuration to use, see Configure the Docker daemon connection settings for details. Select a configuration from the list or click New. and create a new configuration on the Docker page that opens.
In the Configuration file(s) field, specify the docker-compose configuration files to use. The base configuration file located in the project root is selected by default. To select a different file or several files, click and select the desired configuration file in the Docker Compose Configuration Files dialog that opens.
From the Service list, choose the service corresponding to the container the PHP development environment is set up in.
If necessary, in the Environment Variables field, provide the environment variables. See Docker run configuration settings for details.
For Docker containers, PhpStorm by default suggests the php location.
When you click OK , PhpStorm checks whether the PHP executable is actually stored in the specified folder.
If no PHP executable is found, PhpStorm displays an error message asking you whether to continue searching or save the interpreter configuration anyway.
If the PHP executable is found, you return to the CLI Interpreters dialog where the installation folder and the detected version of the PHP interpreter are displayed.
In the CLI Interpreters dialog, click Show phpinfo to have PhpStorm display a separate information window with the installation details and the list of loaded extensions and configured options. Note that the additional options specified in the Configuration Options field of the PHP Interpreters dialog are not listed.
Always start a new container (‘docker-compose run’) : choose this option to have the container started via the run command. The container will be restarted upon each run.
Connect to existing container (‘docker-compose exec’) : choose this option to have the container started once, and then connect to it via the exec command.
By using the Vagrant configuration, you can access a PHP interpreter installed on the corresponding Vagrant instance.
Before you start:
Make sure that Vagrant and Oracle’s VirtualBox are downloaded, installed, and configured on your computer as described in Vagrant: Working with Reproducible Development Environments.
Make sure the Vagrant bundled plugin is enabled in the Installed tab of the Settings/Preferences | Plugins page as described in Managing plugins.
vagrant.bat or vagrant from your Vagrant installation. This should be done automatically by the Vagrant installer.
VBoxManage.exe or VBoxManage from your Oracle’s VirtualBox installation.
Configure the PHP development environment in the Vagrant instance to be used.
Configure a PHP interpreter in a Vagrant instance
Press Ctrl+Alt+S to open the IDE settings and select PHP .
On the PHP page that opens, click next to the CLI Interpreter list.
In the CLI Interpreters dialog that opens, click in the left-hand pane, then choose From Docker, Vagrant, VM, WSL, Remote. from the popup menu.
In the Configure Remote PHP Interpreter dialog that opens, choose the Vagrant method.
Provide the connection parameters:
Specify the Vagrant instance folder which points at the environment you are going to use. Technically, it is the folder where the VagrantFile configuration file for the desired environment is located. Based on this setting, PhpStorm detects the Vagrant host and shows it as a link in the Vagrant Host URL read-only field.
To use an interpreter configuration, you need path mappings that set correspondence between the project folders, the folders on the server to copy project files to, and the URL addresses to access the copied data on the server. PhpStorm evaluates path mappings from the VagrantFile configuration file.
For Vagrant instances, PhpStorm by default suggests the /usr/bin/php location.
To specify a different folder, click and choose the relevant folder in the dialog that opens. Note that the PHP home directory must be open for editing.
When you click OK , PhpStorm checks whether the PHP executable is actually stored in the specified folder.
If no PHP executable is found, PhpStorm displays an error message asking you whether to continue searching or save the interpreter configuration anyway.
If the PHP executable is found, you return to the CLI Interpreters dialog where the installation folder and the detected version of the PHP interpreter are displayed.
In the CLI Interpreters dialog, click Show phpinfo to have PhpStorm display a separate information window with the installation details and the list of loaded extensions and configured options. Note that the additional options specified in the Configuration Options field of the PHP Interpreters dialog are not listed.
By using WSL , you can access a PHP interpreter installed in a Linux environment through the Windows Subsystem for Linux compatibility layer.
Before you start, make sure the following prerequisites are met:
On your Windows 10 machine, make sure the WSL feature is enabled, and the preferred Linux distribution is installed. Refer to the Windows Subsystem for Linux Installation Guide for Windows 10 for details.
Inside the Linux installation, make sure PHP is installed. For the detailed installation instructions, refer to Debian GNU/Linux installation notes. If you are using Ubuntu, you can run this command in the Terminal to quickly install PHP:
Configure a PHP interpreter using WSL
Press Ctrl+Alt+S to open the IDE settings and select PHP .
On the PHP page that opens, click next to the CLI Interpreter list.
In the CLI Interpreters dialog that opens, click in the left-hand pane, then choose From Docker, Vagrant, VM, WSL, Remote. from the popup menu.
In the Configure Remote PHP Interpreter dialog that opens, choose the WSL method.
From the Linux distribution list, choose one of the installed Linux distributions to use.
For WSL, PhpStorm by default suggests /usr/local/bin/php .
To specify a different folder, click and choose the relevant folder in the dialog that opens. Note that the PHP home directory must be open for editing.
When you click OK , PhpStorm checks whether the PHP executable is actually stored in the specified folder.
If no PHP executable is found, PhpStorm displays an error message asking you whether to continue searching or save the interpreter configuration anyway.
If the PHP executable is found, you return to the CLI Interpreters dialog where the installation folder and the detected version of the PHP interpreter are displayed.
In the CLI Interpreters dialog, click Show phpinfo to have PhpStorm display a separate information window with the installation details and the list of loaded extensions and configured options. Note that the additional options specified in the Configuration Options field of the PHP Interpreters dialog are not listed.
Provide additional configuration options
Press Ctrl+Alt+S to open the IDE settings and select PHP .
On the PHP page that opens, click next to the CLI Interpreter list.
In the Additional area of the CLI Interpreters dialog, you can optionally customize the configuration settings of the PHP installation.
In the Debugger extension field, specify the path to Xdebug. This enables PhpStorm to activate Xdebug when it is necessary if you have disabled it in the php.ini file, see Configuring Xdebug for Using in the On-Demand Mode.
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. The directives specified in this field override the default directives generated by PhpStorm, such as -dxdebug.remote_enable=1 , -dxdebug.remote_host=127.0.0.1 , -dxdebug.remote_port=9001 , -dxdebug.remote_mode=req .
For example, if you specify the -dxdebug.remote_mode=jit directive it will override the default -dxdebug.remote_mode=req directive and thus switch Xdebug to the Just-In-Time (JIT) mode, see Debug in the Just-In-Time mode for details.
To do that, click next to the Configuration options field, and then create a list of entries in the Configuration Options dialog that opens.
To add a new entry, click . 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 fields respectively.
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 .
To change the order of entries, click or .
Upon clicking OK , you return to the CLI Interpreters dialog, where the entries are transformed into a command line.
Configure custom mappings
If you use an interpreter accessible through SSH connection or located on a Vagrant instance or in a Docker container, the mappings are automatically retrieved from the corresponding deployment configuration, Vagrantfile , or Dockerfile .
Press Ctrl+Alt+S to open the IDE settings and select PHP .
From the Interpreter list, choose the remote interpreter for which you want to customize the mappings. The Path Mappings read-only field shows the path mappings retrieved from the corresponding deployment configuration, Vagrantfile , or Dockerfile . To specify the custom mappings, click next to the Path Mappings field.
The Edit Project Path Mappings dialog shows the path mappings retrieved from the deployment configuration, Vagrantfile , or Dockerfile . These mappings are read-only.
To add a custom mapping, click and specify the path in the project and the corresponding path on the remote runtime environment in the Local Path and Remote Path fields respectively. Type the paths manually or click and select the relevant files or folders in the dialog that opens.
To remove a custom mapping, select it in the list and click .
Switch between configured PHP interpreters on the fly
Press Ctrl+Shift+A and start typing Change PHP interpreter . In the suggestions list, select the Change PHP interpreter action.
If necessary, you can assign a keyboard shortcut for this action either directly in the suggestions list by pressing Alt+Enter , or at a later point as described in Configure keyboard shortcuts.
In the popup menu that opens, select one of the configured local or remote PHP interpreters.
The selected interpreter will be set as the default project interpreter on the PHP page of the Settings/Preferences dialog Ctrl+Alt+S . This will also affect the run/debug configurations, test frameworks’, and quality tools’ configurations that are set to use the default project interpreter.