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 for live compiler diagnostics, completion, and navigation, including edits you have not saved. Saving refreshes diagnostics immediately.
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 |
| Live compiler diagnostics, including unsaved edits | 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 to get live diagnostics as you edit .ppphp files.
Workspace settings:
| Setting | Purpose |
|---|---|
ppphp.compiler.path |
Explicit path to the compiler executable |
ppphp.compiler.memoryLimitMegabytes |
Memory allowance per compiler process, in MiB |
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. Select a compatible local Node runtime in Settings | Languages & Frameworks | JavaScript Runtime. Explicit PPPHP_NODE_PATH or -Dppphp.language.server.node.path=/absolute/path/to/node overrides are also supported, with PATH discovery when no runtime is configured. The language-server manifest records the supported Node runtime range.
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:
- The explicit compiler path configured in the editor
PPPHP_COMPILER_PATHfrom the editor's environmentvendor/bin/ppphpin the opened projectppphponPATHor in a platform-standard binary directory
Without an override, a project-local compiler wins, so your editor and CI can use the same installed dependency. If an explicit override is invalid, fix that path rather than relying on automatic discovery.
Compiler memory
VS Code exposes ppphp.compiler.memoryLimitMegabytes. In PhpStorm, use Settings | Languages & Frameworks | ++PHP | Compiler memory limit (MiB). Both default to 512 MiB per compiler process and pass the allowance to compiler calls. These settings do not change php.ini or unrelated terminal commands. See Installation to configure terminal and CI memory allowances.
Windows and WSL
In VS Code Remote WSL, install the extension in the WSL environment and open the project there. Its PHP, Node, and compiler paths must be available inside WSL.
Windows PhpStorm launches the language server using a local Windows Node executable. Selecting a WSL PHP interpreter does not select a WSL Node runtime for the language server. Configure the plugin's compiler path for the environment that runs the compiler, and check its setup guide for Windows and WSL launch options.
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
The ++PHP language server communicates over stdio. Other LSP clients can integrate it; available features depend on the client. 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.