Setting up a PHP interpreter in PhpStorm
To download & install the PHP Interpreter and use it in PHPStorm :
1. Visual C++ Redistributable
2. PHP Interpreter (CLI)
- Download the last version of the PHP interpreter (current: 2020-Apr-14 / PHP 7.4.5) at https://windows.php.net/download
There youve to choose between Non Thread Safe (NTS) and Thread Safe (TS) versions.
- If you are using PHP as FastCGI with IIS you should use the Non-Thread Safe (NTS) versions.
- Otherwise proceed to download the Thread Safe (TS) version.
Click the Zip link that suit your processor architecture (x64 for 64bit, x86 for 32bit or lower).
After the downloading the file, extract the .zip archive in the directory of your choice (for example, in C:php)
- Open the directory you just extracted, you will see bunch of directories (dev, ext, lib, …), DLL files and executables. Spot the php.exe, thats our PHP interpreter 🙂
3. Configure PHPStorm interpreter
- In PHPStorm, go to File menu (Windows), then Settings (
- Go to Languages & Frameworks, then click on PHP.
- Click the
...button from the CLI Interpret field.
- Add a new interpreter by clicking the
Here, provide the PHP Executable path to the php.exe weve spotted earlier (eg.: C:php%currentPhpVersionDir%php.exe).
If done correctly, PHPStorm will display the PHP version & the path to the configuration file (php.ini).
Thats all for linking PHPStorm to a PHP interpreter in itself.