Getting started

Editors

Set up VS Code or PhpStorm for ++PHP, and how the editor integrations find your compiler.

Open .ppphp files in VS Code or PhpStorm to get syntax highlighting, completion, diagnostics, and navigation through your project. Both official integrations use the ++PHP language server, so you get the same compiler diagnostics and source locations in either editor.

Run ppphp check before building or committing. It also runs deeper PHPStan checks that are not included in editor diagnostics, so a file with no editor warnings can still need corrections.

What you get

Capability VS Code PhpStorm
.ppphp file recognition and icon Yes Yes
Syntax highlighting Yes Yes
Compiler diagnostics on open and save Yes Yes
Completion for project, Composer, PHP, and ++PHP symbols Yes Yes
Hover help for ++PHP keywords Yes Yes
Document outline Yes Yes
Go to definition Yes Yes
Rename a class, interface, trait, or enum across the project Yes Yes
Add a use import Yes Yes
Create .ppphp files and classes from the IDE Native Yes
Formatting and code-style settings Not yet Yes

Use Go to Definition to follow a class or member through imports, generics, typed locals, and inheritance. Rename updates references to the selected declaration across the project, not unrelated names that happen to have the same spelling. If a reference cannot be verified, the rename stops without changing your files.

Visual Studio Code

Install the ++PHP extension from the Visual Studio Marketplace (ext install AtatusoftLtd.ppphp-vscode). Open a project that contains ppphp.json and .ppphp files start checking as you save them.

Workspace settings:

Setting Purpose
ppphp.compiler.path Explicit path to the compiler executable
ppphp.completion.importSorting How inserted use statements are ordered
ppphp.diagnostics.compiler.enabled Turn compiler diagnostics on or off
ppphp.diagnostics.compiler.timeoutMilliseconds How long to wait for a check before giving up

PhpStorm

Install the ++PHP plugin from the JetBrains Marketplace. The plugin starts the bundled language server with Node.js, so Node.js 22 or newer must be on PATH, named in PPPHP_NODE_PATH, or given to the IDE as -Dppphp.language.server.node.path=/absolute/path/to/node.

Code style for .ppphp lives under Editor | Code Style | ++PHP. Reformat Code and live indentation honour those settings without parsing the file as ordinary PHP, so generics, typed locals, checked errors, and when expressions stay intact. New class, interface, trait, and enum files use the same brace settings.

In a mixed project, ordinary PHP code can resolve declarations that live in .ppphp files after a successful ppphp build: the plugin reads the compiler's output manifest and indexes only the PHP files compiled from .ppphp, so native navigation works without duplicate symbols or hand-written stubs.

How the compiler is found

Both integrations look for the compiler in this order:

  1. vendor/bin/ppphp in the opened project
  2. ppphp on PATH or in a platform-standard binary directory
  3. The path in the editor setting, or in the PPPHP_COMPILER_PATH environment variable

A project-local compiler wins, so a team pinning a version in composer.json gets the same diagnostics in every editor and in CI.

Project-wide rename and Composer-aware completion need ppphp.json at the workspace root; the language server reads it for the source, output, cache, and exclusion boundaries.

Other editors

Any client that speaks the Language Server Protocol can run the ++PHP language server over stdio. The editors we intend to support next, and where each one stands, are tracked in the editor support page of the language server repository. Open an issue there if you want another editor listed.