Setting up a PHP interpreter in PhpStorm

Setting up a PHP interpreter in PhpStorm

To download & install the PHP Interpreter and use it in PHPStorm :

1. Visual C++ Redistributable

  1. Make sure youve installed Visual C++ Redistributable for Visual Studio 2015-2019 : x64 or x86

2. PHP Interpreter (CLI)

  1. Download the last version of the PHP interpreter (current: 2020-Apr-14 / PHP 7.4.5) at
  2. 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.
  3. Click the Zip link that suit your processor architecture (x64 for 64bit, x86 for 32bit or lower).

  4. After the downloading the file, extract the .zip archive in the directory of your choice (for example, in C:php)

  5. 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

  1. In PHPStorm, go to File menu (Windows), then Settings (Ctrl+Alt+S).
  2. Go to Languages & Frameworks, then click on PHP.
  3. Click the ... button from the CLI Interpret field.
  4. Add a new interpreter by clicking the + button.
  5. 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.

Setting up a PHP interpreter in PhpStorm

Leave a Reply

Your email address will not be published.