Early Access Program Features Releases

Postfix Code Completion for PHP in PhpStorm 9 EAP

PhpStorm 9 brings postfix code completion for PHP, earlier introduced for Java in IntelliJ IDEA and for JavaScript in WebStorm. This new kind of code completion can help raise your productivity even more.

Postfix code completion helps reduce backward caret jumps as you write code. It lets you transform an already typed expression to another one based on the postfix you’ve added, the type of expression, and its context.

For example, when you apply the .if postfix to an expression (just press Tab), it will wrap it with an if statement. Here’s how it looks in action:


Postfix completion suggestions are shown as part of basic completion. If you’d like to see the whole list of postfix completions applicable in the context, press the Ctrl+J (CmdJ).


All postfix completion templates can be found in Settings / Preferences | Editor | General | Postfix Completion, where you can explore them and disable any that you don’t need:


Some of the templates have aliases (alternative postfix names). For instance, the exclamation mark will have the same effect as .not. Just enter ! after an expression and press Tab to negate it.

If there are multiple options of how a postfix template can be applied, the IDE will ask which expression you meant:


Download the latest PhpStorm 9 EAP and try postfix code completion for PHP today!

Please share your thoughts, feature requests or encountered issues through the issue tracker, by posting in the comments below, or in our forums.

Develop with pleasure!
-JetBrains PhpStorm Team

image description